1833059 Members
2928 Online
110049 Solutions
New Discussion

NIS

 
Bona_1
Frequent Advisor

NIS

Is there ANYWAY to reverse NIS? Some dude seems to configured NIS on my server, and I'm wondering whether it's possible to deconfigure it.
6 REPLIES 6
Leif Halvarsson_2
Honored Contributor

Re: NIS

Hi,

What do you mean with "configuring NIS", NIS server or NIS client ?

Of course it is possible to deconfigure, use SAM or edit the file /etc/rc.config.d/namesvrs
Pete Randall
Outstanding Contributor

Re: NIS

You can simply change your /etc/nsswitch.conf file to ignore nis:hosts:

files[NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=continue UNAVAIL=continue TRY
AGAIN=return] nis

The above would search NIS last - you can just leave off the nis entry, too.


Pete




Pete
A. Clay Stephenson
Acclaimed Contributor

Re: NIS

Yes, of course. I am a little surprised that you let "some dude" do anything on "your" server but the answer is to cd to /sbin/init.d and
./ nis.client stop
./ nis.server stop

Edit /etc/rc.config.d/namesvrs and set the NIS_SERVER and/or NIS_CLIENT values to zero. You also need to edit /etc/nsswitch.conf to not use NIS. Things get more complicated depending upon what NIS was doing for you. You may need a new passwd and/or group file. You may need a new /etc/services file and if NIS was doing hostname resolution then you will need DNS and/or /etc/hosts entries.

After doing all this, the easist answer is to then reboot.

NOTE: If this box was the master NIS server then you actions could affect many, many boxes so look before you leap.
If it ain't broke, I can fix that.
Mark Grant
Honored Contributor

Re: NIS

Yes,

First change /etc/nsswitch.conf so everything stops using nis.

Then get a copy of the maps (ypcat), manually copy them to the relevant files (passwd, hosts etc) making sure you have a copy of them first. Remove the NIS "+" entries if they are there. Stop NIS daemons.
Never preceed any demonstration with anything more predictive than "watch this"
Bona_1
Frequent Advisor

Re: NIS

Perhaps i should make myself more precise. I can no longer administer users... that is my immediate concern. The server is simply a test server, not live at all. I can't adjust the user password, when i type the passwd command, it gives me the error

# passwd
Supported configurations for passwd management are as follows:
passwd: files
passwd: files ldap
passwd: files nis
passwd: files nisplus
passwd: compat
passwd: compat AND
passwd_compat: nisplus


thanks
Mark Grant
Honored Contributor

Re: NIS

Try yppasswd

I think that might help.
Never preceed any demonstration with anything more predictive than "watch this"