1823022 Members
3763 Online
109645 Solutions
New Discussion юеВ

Turning NIS off

 
SOLVED
Go to solution
Kevin Griesmar
Occasional Advisor

Turning NIS off

I have a server setup as a slave and I want to remove it from NIS. What would be the easiest way for me to turn the NIS off?
7 REPLIES 7
Brian M. Fisher
Honored Contributor
Solution

Re: Turning NIS off

1) Turn off NIS client
/sbin/init.d/nis.client stop
2) Turn off NIS server
/sbin/init.d/nis.server stop
3) Edit /etc/nsswitch.conf to not use nis
4) Edit /etc/rc.config.d/namesvrs & set NIS_SLACE_SERVER=0
NIS_CLIENT=0
NIS_DOMAIN=""

Brian
<*(((>< er

Perception IS Reality
Rick Garland
Honored Contributor

Re: Turning NIS off

Check to make sure that there are not any hosts bound to the slave.
Also, do a ypcat -k ypservers - this will tell you what the NIS servers are.
You will need to remove the slave server in question from this list

ypcat -k ypservers > /tmp/
(edit the file to remove the servername in question)
cat /tmp/ | makedbm - /var/yp/'domainname'/ypservers

Remove the NIS maps on the slave in question so it won't start the ypserv process.
Also, edit the /etc/rc.config.d/namesvrs file and change the entry that tells the server to be a slave.

The new ypservers map will only push out to those servers listed in the file.
Albert E. Whale, CISSP
Honored Contributor

Re: Turning NIS off

The easiet method to tuyrn off NIS resolution is to edit the file /etc/nsswitch.conf make sure that NIS is not in the file, and then save it. It will then revert to the method that you;ve selected.

Sample configurations are available in /etc/nsswitch.files

More information can be found by typing:

man service.switch
man nsswitch.conf (or man switch - they are the same).

Essentially by removing the nis statement in the /etc/nsswitch.conf file you disable nis lookups. Although that does not disable the daemons.

Hope that's what you are looking for.

Have a Great Day!
Sr. Systems Consultant @ ABS Computer Technology, Inc. http://www.abs-comptech.com/aewhale.html & http://www.ancegroup.com
Berlene Herren
Honored Contributor

Re: Turning NIS off

Then kill ypbind to finish it off!

Berlene
http://www.mindspring.com/~bkherren/dobes/index.htm
Albert E. Whale, CISSP
Honored Contributor

Re: Turning NIS off

Then assign points to all that answered!
Sr. Systems Consultant @ ABS Computer Technology, Inc. http://www.abs-comptech.com/aewhale.html & http://www.ancegroup.com
Kevin Griesmar
Occasional Advisor

Re: Turning NIS off

I will try all of these methods and relay the information to my colleagues. Thank you all for your time!!
William Ringler
New Member

Re: Turning NIS off

First, execute from /sbin/init.d (start scripts) nis.client_stop, and nis.server_stop This will stop the nis scripts from running. Check the name svrs, (located in /etc/rc.config.d), and vi the file, look at nis master server line
master needs to be = to 0, client=0, and slave should also =0.
Second, on the servers, move the /var/yp/nis domain directory to disconnect the NIS Maps.
Third, cd /etc, and look for the nsswitch.conf file, (this is the file that is used for the nis policies). Rename nsswitch.conf to nsswitch.bak, then rename nsswitch.files to nsswitch.conf. This should be on the clients as well. Leave the /etc/passwd files alone!
Silence is Acceptance