How To Create a Password File When Removing NIS+?

How To Create a Password File When Removing NIS+?

Post by Jon Forre » Wed, 27 Mar 1996 04:00:00



I have a small Sun environment running Solaris 2.4 and NIS+. (I inhereted
it - I didn't create it). I want to remove all traces of NIS+.

On the NIS+ server machine I ran

        niscat passwd.org_dir

and redirected the output into a file which I'll call the master
passwd file. I was thinking that I could use this file to populate
the passwd file on the clients (and the server, once the clients
were off of NIS+).

So, I logged into a client, modified /etc/nsswitch.conf to remove
all mention of nisplus, and then rebooted.

I then inserted the master passwd file in /etc/passwd on the client
and then ran pwconv. I was expecting new entries to be added to
/etc/shadow corresponding to the new lines that I had added to /etc/passwd.
This did not happen. Instead, somehow, /etc/passwd reverted back
to its original contents - that is the contents before I had inserted
the master password file.

I fooled around trying various things but each time /etc/passwd
magically gets restored to what is was before I changed it.

I'm lost. How does /etc/passwd go back to its original contents?
How are you supposed to create a passwd file on a ex-NIS+ client?

--
Anything you read here is my opinion and in no way represents the Univ. of Cal.

"I deal with dreamers, and telephone screamers." -- Joni Mitchell

 
 
 

How To Create a Password File When Removing NIS+?

Post by Jim Lev » Sat, 30 Mar 1996 04:00:00



>I have a small Sun environment running Solaris 2.4 and NIS+. (I inhereted
>it - I didn't create it). I want to remove all traces of NIS+.

>On the NIS+ server machine I ran

>    niscat passwd.org_dir

>and redirected the output into a file which I'll call the master
>passwd file. I was thinking that I could use this file to populate
>the passwd file on the clients (and the server, once the clients
>were off of NIS+).

You'd be better off to use nisaddent and dump both the passwd and shadow
tables, i.e:

/usr/lib/nis/nisaddent -d passwd >passwd
/usr/lib/nis/nisaddent -d shadow >shadow

Quote:>So, I logged into a client, modified /etc/nsswitch.conf to remove
>all mention of nisplus, and then rebooted.

Ahh, that won't get rid of NIS+. To get the client to stop using NIS+ you'll
need to remove /.rootkey and remove /var/nis and adjust the
/etc/nsswitch.conf file. After a reboot the client won't know about NIS+
anymore.

After the reboot you can append your passwd and shadow dumps to the files,
be sure that /etc/shadow gets set back to mode 0400 and owned by root.

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

 The opinions expressed above are just that...  Ph:    (205) 534-1087