HP Visualize J210XC IRIX to HP-UX Migration Guide - Page 96

Configuring and Administering an NIS Client

Page 96 highlights

NIS 1. Login as root to the NIS master server. 2. Make your changes to the source file for the NIS map. For example, if you want to change the NIS hosts map, make your changes to the /etc/hosts file. 3. Issue the following commands to generate the map and push it to the slave servers: # cd /var/yp # /usr/ccs/bin/make mapname 4. If your slave servers are not up and running yet, run the make command with the NOPUSH flag set to 1: # cd /var/yp # /usr/ccs/bin/make NOPUSH=1 mapname This procedure works for all NIS maps, except the ypservers map, which has no source file. 5. If you make changes to the passwd or group maps, regenerate the netid.byname map. The netid.byname map is a mapping of users to groups, where each user is followed by a list of all the groups to which the user belongs. The netid.byname map is generated from the /etc/passwd and /etc/group files. Configuring and Administering an NIS Client To Edit the NIS Client's passwd File Follow these steps to edit the NIS client's passwd file: 1. Remove all users from the /etc/passwd file except the root user and the system entries required for your system to boot. By convention, system entries usually have user ids less than 100, so you can remove all entries with user ids of 100 or greater. 2. Add the following entry as the last line in the /etc/passwd file: +::-2:60001::: The plus sign (+) initiates consultation of NIS for any user information not found in the local /etc/passwd file. The -2 in the user ID field restricts the access of people who may attempt to login using + as a valid user name when NIS is not running. Anyone who successfully logs in as + will be granted only the access permissions of user nobody. CAUTION: Do not put an asterisk (*) in the password field on HP systems. On Sun systems, an asterisk in the password field prevents people from logging in as + when NIS is not running. However, on HP systems, the asterisk prevents all users from logging in when NIS is running. The changes you make to the /etc/passwd file on an NIS client are the same changes you make on an NIS slave server. The following is an example /etc/passwd file on an NIS client: root:0AnhFBmriKvHA:0:3: :/:/bin/ksh daemon:*:1:5::/:/bin/sh bin:*:2:2::/bin:/bin/sh adm:*:4:4::/usr/adm:/bin/sh uucp:*:5:3::/usr/spool/uucppublic:/usr/lib/uucp/uucico lp:*:9:7::/usr/spool/lp:/bin/sh hpdb:*:27:1:ALLBASE:/:/bin/sh 91

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125

NIS
91
1.
Login as
root
to the NIS master server.
2.
Make your changes to the source file for the NIS map. For example, if you want to change the NIS
hosts map, make your changes to the
/etc/hosts
file.
3.
Issue the following commands to generate the map and push it to the slave servers:
# cd /var/yp
# /usr/ccs/bin/make mapname
4.
If your slave servers are not up and running yet, run the
make
command with the
NOPUSH
flag set to
1
:
# cd /var/yp
# /usr/ccs/bin/make NOPUSH=1 mapname
This procedure works for all NIS maps, except the
ypservers
map, which has no source file.
5.
If you make changes to the
passwd
or
group
maps, regenerate the
netid.byname
map. The
netid.byname
map is a mapping of users to groups, where each user is followed by a list of all the
groups to which the user belongs.
The netid.byname
map is generated from the
/etc/passwd
and
/etc/group
files.
Configuring and Administering an NIS Client
To Edit the NIS Client’s passwd File
Follow these steps to edit the NIS client±s passwd file:
1.
Remove all users from the
/etc/passwd
file except the
root
user and the system entries required for
your system to boot. By convention, system entries usually have user ids less than 100, so you can
remove all entries with user ids of 100 or greater.
2.
Add the following entry as the last line in the
/etc/passwd
file:
+::-2:60001:::
The plus sign (
+
) initiates consultation of NIS for any user information not found in the local
/etc/passwd
file.
The
-2
in the
user ID
field restricts the access of people who may attempt to login using
+
as a valid
user name when NIS is not running. Anyone who successfully logs in as
+
will be granted only the
access permissions of user
nobody
.
CAUTION: Do not put an asterisk (
*
) in the
password
field on HP systems. On Sun systems, an asterisk in
the
password
field prevents people from logging in as
+
when NIS is not running. However, on HP
systems, the asterisk prevents all users from logging in when NIS is running.
The changes you make to the
/etc/passwd
file on an NIS client are the same changes you make on an NIS
slave server. The following is an example
/etc/passwd
file on an NIS client:
root:0AnhFBmriKvHA:0:3: :/:/bin/ksh
daemon:*:1:5::/:/bin/sh
bin:*:2:2::/bin:/bin/sh
adm:*:4:4::/usr/adm:/bin/sh
uucp:*:5:3::/usr/spool/uucppublic:/usr/lib/uucp/uucico
lp:*:9:7::/usr/spool/lp:/bin/sh
hpdb:*:27:1:ALLBASE:/:/bin/sh