Removing NIS from a Solaris system
This simple article provides the quick steps to completely remove NIS from a Master Server, from a Slave Server, or from a NIS client.
Personally, I would remove NIS in the following order:
Master Server
Use these steps to remove NIS from the Master Server
- Login the master server as root
- Remove the NIS domainname file:
# rm /etc/defaultdomain
- Copy the name servers .files into place:
# cp /etc/nsswitch.files /etc/nsswitch.conf
If you have DNS services, edit the hosts entry in the /etc/nsswitch.conf file to read:hosts: files dns
- Change directory to the NIS repository:
# cd /var/yp
- Remove ALL timestamp files:
# rm *.time
- Remove the NIS <domainname> directory. For example:
# rm -rf mydomain.example.com
- Remove the NIS binding file
# rm binding
- Reboot the server
# init 6
Slave Server
Use these steps to remove NIS from the Slave Server
- Login the slave server as root
- Remove the NIS domainname file:
# rm /etc/defaultdomain
- Copy the name servers .files into place:
# cp /etc/nsswitch.files /etc/nsswitch.conf
If you have DNS services, edit the hosts entry in the /etc/nsswitch.conf file to read:hosts: files dns
- Change directory to the NIS repository:
# cd /var/yp
- Remove the NIS <domainname> directory. For example:
# rm -rf mydomain.example.com
- Remove the NIS binding file
# rm binding
- Reboot the server
# init 6
NIS Client
Use these steps to remove NIS from a client
- Login the NIS client as root
- Remove the NIS domainname file:
# rm /etc/defaultdomain
- Copy the name servers .files into place:
# cp /etc/nsswitch.files /etc/nsswitch.conf
If you have DNS services, edit the hosts entry in the /etc/nsswitch.conf file to read:hosts: files dns
- Change directory to the NIS repository:
# cd /var/yp
- Remove the NIS binding file
# rm binding
- Reboot the server
# init 6