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

Configuring and Administering an NIS Slave Server

Page 92 highlights

NIS 3. Using a text editor, remove users who should not be allowed access to the NIS master server from the /etc/passwd file . Do not include a plus sign (+) in this file. 4. Use a text editor to edit the /var/yp/Makefile file as follows. Change the line PWFILE=$(DIR)/passwd to PWFILE=$(DIR)/passwd.yp 5. In the /etc/rc.config.d/namesvrs file, modify the YPPASSWDD_OPTIONS variable as follows. Change the line YPPASSWDD_OPTIONS="/etc/passwd -m passwd PWFILE=/etc/passwd" to YPPASSWDD_OPTIONS="/etc/passwd.yp -m passwd PWFILE=/etc/passwd.yp" 6. Issue the following commands to regenerate the NIS passwd maps from /etc/passwd.yp: # cd /var/yp # /usr/ccs/bin/make passwd These commands generate both the passwd.byname and the passwd.byuid maps and pushes them to the slave servers. If your slave servers are not up and running yet, run make with the NOPUSH flag set to 1: # cd /var/yp # /usr/ccs/bin/make NOPUSH=1 passwd This procedure creates a restricted /etc/passwd file that is used only by the NIS master server. The unrestricted /etc/passwd.yp file is used to generate the NIS passwd maps, which are used by the rest of the hosts in the NIS domain. Configuring and Administering an NIS Slave Server The NIS master server must be configured and running before you start your slave servers. To Edit the Slave Server's passwd File Follow these teps to edit the slave server'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 (+) causes processes to consult 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 missions of user nobody. 87

  • 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
87
3.
Using a text editor, remove users who should not be allowed access to the NIS master server from the
/etc/passwd
file .
Do not include a plus sign (
+
) in this file.
4.
Use a text editor to edit the
/var/yp/Makefile
file as follows.
Change the line
PWFILE=$(DIR)/passwd
to
PWFILE=$(DIR)/passwd.yp
5.
In the
/etc/rc.config.d/namesvrs
file, modify the
YPPASSWDD_OPTIONS
variable as follows.
Change the line
YPPASSWDD_OPTIONS="/etc/passwd -m passwd PWFILE=/etc/passwd"
to
YPPASSWDD_OPTIONS="/etc/passwd.yp -m passwd PWFILE=/etc/passwd.yp"
6.
Issue the following commands to regenerate the
NIS
passwd
maps from
/etc/passwd.yp
:
# cd /var/yp
# /usr/ccs/bin/make passwd
These commands generate both the
passwd.byname
and the
passwd.byuid
maps and pushes them to
the slave servers.
If your slave servers are not up and running yet, run
make
with the
NOPUSH
flag
set to
1
:
# cd /var/yp
# /usr/ccs/bin/make NOPUSH=1 passwd
This procedure creates a restricted
/etc/passwd
file that is used only by the NIS master server. The
unrestricted
/etc/passwd.yp
file is used to generate the
NIS
passwd
maps, which are used by the rest of the
hosts in the
NIS
domain.
Configuring and Administering an NIS Slave Server
The NIS master server must be configured and running before you start your slave servers.
To Edit the Slave Server’s passwd File
Follow these teps to edit the slave server±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 (
+
) causes processes to consult 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 missions of user
nobody
.