Information
A Network Information Service (NIS) server is a host that provides configuration information to other hosts on a network. NIS servers store tables of information about users, groups, and more. They also maintain a set of maps and run the ypserv daemon, which processes requests from clients for information in those maps.
As NIS is extremely insecure, the NIS server packages must be removed from the system unless absolutely needed.
- IF - NIS must be used in the environment, and is approved by local site policy, limit access to the NIS data to specific subnets.
By default the NIS server will authenticate all IP addresses if the /var/yp/securenets file does not exist, or exists without any subnets defined. The /var/yp/securenets file contains a list of subnets that are considered trusted and are allowed to access NIS data using the ypserv and ypxfrd daemons. This is a user-created file that resides on a NIS master server and any slave servers. Without configuring this file, anyone with knowledge of the NIS server address and the domain name, can obtain NIS served data, including the contents of the /etc/passwd file. Hence, it is recommended that the /var/yp/securenets file is configured to restrict access.
Solution
Ensure that all of the NIS daemons are inactive:
stopsrc -g yp
De-install the NIS server software:
installp -u bos.net.nis.server
- OR -
- IF - the NIS server package is required as a dependency, or NIS must be used in the environment, and is approved by local site policy:
Ensure that all of the NIS daemons are inactive:
stopsrc -g yp
De-install the NIS server software:
installp -u bos.net.nis.server
Create and secure the /var/yp/securenets file (if it does not already exist):
touch /var/yp/securenets
chmod u=rw,go= /var/yp/securenets
chown root:system /var/yp/securenets
Edit the file:
vi /var/yp/securenets
Add the allowed subnets:
255.255.255.0 128.311.10.0
NOTE: The format of the file is netmask netaddr as shown in the example above. Explicitly define all valid network subnets (one entry per line).
Stop and start NIS to implement the configuration changes:
stopsrc -g yp
startsrc -g yp