[SunHELP] Ideas needed for syncronizing /etc/passwd and /etc/group uids and gids
Sandwich Maker
adh at an.bradford.ma.us
Fri Jul 25 18:43:48 CDT 2003
"From: "Lumpkin, Buddy" <Buddy.Lumpkin at nordstrom.com>
"
"We have a few hundred systems that all share a common /etc/passwd and
"/etc/shadow file. Recently we have inherited a couple pre-existing systems
"that have common usernames and groups with different uids and gids. This is
"especially a concern for usernames like oracle.
"
"I can certainly cook something up that will convert all of the files on these
"systems before/after putting in the new /etc/passwd and /etc/group files but I
"was wondering if anyone had already done this and already had some good ideas
"on how to tackle this with minimal pain.
"
"I was thinking about benchmarking a quick and dirty shell script on one of our
"lab systems but im scared that I might find that this is going to take hours
"unless I write something in perl or C that only iterates thru each file on the
"system once (one stat() per file).
how about
############
#!/usr/bin/ksh
while IFS=: read _USER _PASSWD _UID _GID _GCOS _HOME _SHELL JUNK
do
if (( _UID > 100 ))
then
chmod -R $_UID:$_GID $_HOME &
else
:
fi
done < /etc/passwd
############
that what you had in mind?
________________________________________________________________________
Andrew Hay the genius nature
internet rambler is to see what all have seen
adh at an.bradford.ma.us and think what none thought
More information about the SunHELP
mailing list