To restrict users to any server, here are the simplest steps:
Step 1:
On NIS server, edit "netgroup" map and add:
#tail -1 /etc/yp/netgroup
splgroup username1 username2 username3
Step 2:
On NIS server, Re-Make this map by doing following:
# cd /var/yp
# ./make netgroup
Step 3:
On NIS client (i.e. where I need to restrict users)
Edit /etc/passwd file and add the following line:
+@splgroup:x:::::
Edit /etc/shadow file and add following line:
+@splgroup::::::::
Edit /etc/nsswitch.conf file and in passwd entry, change as follows:
passwd: compat
Restart NIS client. For Solaris 10, it can be done by:
# svcadm refresh /network/nis/client
With "splgroup" netgroup in place, only "username1 - 3" will be allowed to login to the NIS client.
1 comment:
Are there any instructions on how to make this work using the Sun Directory Server (LDAP) instead of NIS?
Post a Comment