To remove the NIS+ namespace and return to using either NIS or /etc files for name services, follow these steps:
Remove the .rootkey file from the root master.
rootmaster# rm -f /etc/.rootkey |
Remove the groups_dir and org_dir subdirectories from the root master root domain.
rootmaster# nisrmdir -f groups_dir.domainname rootmaster# nisrmdir -f org_dir.domainname |
Where domainname is the name of the root domain, for example, doc.com.
Remove the root domain.
rootmaster# nisrmdir -f domainname |
Where domainname is the name of the root domain, for example, doc.com.
Stop the keyserver.
client# svcadm disable /network/rpc/keyserv |
Stop the NIS+ service.
This kills the rpc.nisd daemon and the nis_cachemgr.
rootmaster# svcadm disable -t /network/rpc/nisplus:default |
Stop the name service cache (nscd).
rootmaster# svcadm disable -t /system/name-service-cache:default |
Create a new domain.
rootmaster# domainname name |
Where name is the name of the new domain; for example, the name of the domain before you installed NIS+.
Remove the existing /etc/defaultdomain file.
rootmaster# rm /etc/defaultdomain |
Recreate the /etc/defaultdomain file with the new domain name.
rootmaster# domainname > /etc/defaultdomain |
Replace the original nsswitch.conf file.
If you set up this server with nisserver -r, you can use:
rootmaster# cp /etc/nsswitch.conf.no_nisplus /etc/nsswitch.conf |
Alternatively, you can copy over one of the default switch template files. To use the default NIS switch file template, you would type:
rootmaster# cp /etc/nsswitch.nis etc/nsswitch.conf |
To use the default /etc files switch file template, you would type:
rootmaster# cp /etc/nsswitch.files etc/nsswitch.conf |
Remove the /var/nis directory and files.
rootmaster# rm -rf /var/nis/* |
Start the NIS+ service.
rootmaster# svcadm enable /network/rpc/nisplus:default |