Solaris Naming Administration Guide

Removing the NIS+ Namespace

To remove the NIS+ namespace and return to using either NIS or /etc files for name services, follow these steps:

  1. Remove the .rootkey file from the root master.


    rootmaster# rm -f /etc/.rootkey
  2. 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.

  3. Remove the root domain.


    rootmaster# nisrmdir -f domainname
    

    Where domainname is the name of the root domain, for example, doc.com.

  4. Locate and kill the keyserv, rpc.nisd, nis_cachemgr, and nscd processes.


    rootmaster# ps -ef | grep rpc.nisd
     root 137 1 67 16:34:44 ? rpc.nisd
    rootmaster# kill -9 137
    rootmaster# ps -ef | grep keyserv
     root 714 1 67 16:34:44 ? keyserv
    rootmaster# kill -9 714
    rootmaster# ps -ef | grep nis_cachemgr
     root 123 1 67 16:34:44 ? nis_cachemgr
    rootmaster# kill -9 123
    rootmaster# ps -ef | grep nscd
     root 707 1 67 16:34:44 ? nscd
    rootmaster# kill -9 707
  5. 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+.

  6. Remove the existing /etc/defaultdomain file.


    rootmaster# rm /etc/defaultdomain
    
  7. Recreate the /etc/defaultdomain file with the new domain name.


    rootmaster# domainname > /etc/defaultdomain
  8. 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
  9. Restart the keyserv process.


    rootmaster# keyserv
  10. Remove the /var/nis directory and files.


    rootmaster# rm -rf /var/nis/*
  11. Now restart your other name service (NIS or /etc files).