Summary: pwconv under NIS

From: Leiv Jarle Larsen <leiv.jarle.larsen_at_ementor.no>
Date: Mon Feb 23 2004 - 03:40:23 EST
Bottom line is that you can't use pwconv on NIS, but there are some
workarounds.

As Dan Penrod points out :

If you run...

root@trinity(104)# strings pwconv |grep etc

you'll see that the paths are all hard-coded into the binary.

/etc/shadow
/etc/passwd
/etc/ptmp
/etc/ptmp
/etc/ptmp
/etc/shadow
/etc/shadow
...
/etc/opasswd
/etc/opasswd
/etc/passwd
/etc/opasswd
...
/etc/oshadow
/etc/shadow
/etc/passwd
/etc/opasswd
/etc/passwd
/etc/opasswd
...
root@trinity(105)#

Using symbolic links in the /etc directory is the only way that I can
imagine tricking the pwconv utility

Ryan Anderson came up with this :

I would do this:

1) Make a backup of /etc/passwd and /etc/shadow
2) Append your NIS passwd to /etc/passwd
3) Run pwconv
4) Copy /etc/passwd and /etc/shadow somewhere else, and take out the
local accounts (root, etc)
5) Copy back the original /etc/passwd and /etc/shadow back

Mark Andrews had this tip :

If you want to split the NIS passwd file into a separate passwd and
shadow files,
concatenate the NIS passwd file to the end of the local passwd file and
run pwconv.

Next, copy the entries that should be in the NIS passwd and shadow files

from
the local files to /var/yp/ypetc/passwd and shadow, then delete them
from the
local passwd and shadow files.

Thanks a lot for all the tips.

regards
<Leiv>

-----Original Message-----
From: Leiv Jarle Larsen
Sent: 20. februar 2004 10:10
To: sunmanagers@sunmanager.org
Subject: pwconv under NIS


As you may know, pwconv syncs the shadow-file with the password-file.

Is it possible to use pwconv under NIS? The shadow and password-file is
stored under another location i.e /var/yp/etc The man-pages for pwconv
only tells about locally stored password and shadow-file.

Will summarize.

regards

Leiv Jarle Larsen
Systems Consultant
______________________________
Ementor Norge AS, Skvadronvn. 2, NO-4050  SOLA
Tel +47 51 64 00 00, Dir +47 51 64 00 32, Mobile +47 93 03 30 62
leiv.jarle.larsen@ementor.no www.ementor.no
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Mon Feb 23 03:40:18 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:29 EST