Password shadow reconciliation - More information

Drew Skinner <[email protected]>
Newsgroups gmane.os.solaris.managers
Message-ID <CAMZWb2S5X5G-08DGb+BW_3kM121R6ebNZUk6P6rk=iuMBYfSJA@mail.gmail.com>
Hi;

A lot of people have responded (thanks), but I don't have a solution for
this yet. Based on a lot if internal tests I've done, using 'sort' or
'uniq' is not an option.

Here's a sample where smmsp is duplicated:

smmsp:x:25:25:owner=some user:/:
smmsp:x:25:25:Sendmail Message Submission Program:/:

Now, the "owner=some user" is simply a change to the comment field as
required by Information security at this site. Someone must be accountable
for each account. In this case "some user" would be the senior manager in
charge of Unix. We use ldap for everything except local system accounts.

What I'm thinking the resolution would need to consist of would be the
following:

scp the program to all servers (easy from the administration boxes).

On each server build an array using cut (I've never tried this in shell and
don't program perl)

Eg:

for user in `cat /etc/passwd`; if [ "` $USER |cut -f1 -d";"`" IN $USER1 ]
  --> skip to next user
else
$USER1 = $USER1 + $USER

done

echo $USER1 > /var/tmp/passwd.NEW

Do the same for shadow & group

I'd add an additional loop for something along the lines of:  if [
"`zoneadm list`" != "global" ]  then zlogin to all zones and repeat the
above loop.

If someone could assist with building that array in shell, I'll gladly
share the final script.

Thanks everyone,


Drew.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.