[98305] in RedHat Linux List

home help back first fref pref prev next nref lref last post

passwd/shadow parsing script

daemon@ATHENA.MIT.EDU (Toby Herring)
Sun Nov 8 00:48:38 1998

Reply-To: "Toby Herring" <therring@syncroflo.com>
From: "Toby Herring" <therring@syncroflo.com>
To: <redhat-list@redhat.com>
Date: Sun, 8 Nov 1998 00:48:08 -0500
Resent-From: redhat-list@redhat.com

OK, next question.  (While reading this, please keep in mind that I am NOT a
programmer.  Or at least I haven't done any programming in about 10 years or
so.)

Anyone know where I can find a shell script (bash) or Perl script (5.04)
that will parse the entries in /etc/passwd or /etc/shadow (depending on
installation, obviously), find a specific user, and replace a specific field
of the entry?  (This time around, I want to remove the password, but in the
future I may want to use it to manipulate other fields.)

Even better would be a script that could accept a file containing a list of
usernames, and perform a specific field modification on all of those users
entries in the passwd/shadow file.  (i.e.  I have a "project leader" provide
me with a list of personnel assigned to their "project," create a custom
group for that project, then use the script to mass-modify all of those
users to add them to the group.)  Another possibility is if I were to for
one reason or another need to force expiration of all passwords on a
specific date.
--
Toby Herring
IS Coordinator
SyncroFlo, Inc.




-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post