From: Jerry Brady <jerry.brady () faypwc ! com>
To: tru64-unix-managers
Subject: SUMMARY:script to change passwd file
Date: Mon, 20 Nov 2000 20:37:02 +0000 [thread overview]
Message-ID: <97475250422617.tru64-unix-managers.marc@archive.invalid> (raw)
You people are great!
So far I have recieved 3 very good ways to do this
1. use a command called "usermod" the man page walks you through this one.
Stan Horwitz
2. use /usr/sbin/vipw, here is good example from Paul A Sand
#!/usr/bin/ksh
EDITOR=/bin/ed
export EDITOR
/usr/sbin/vipw <<xxxFUNNYxxx
/^pwc/s^homeg^auth/users^
w
q
xxxFUNNYxxx
3. awk -F: '{ if (substr($1,1,3) == "pwc") printf
"%s:%s:%s:%s:%s:/auth/users/%s:%s\n", $1, $2, $3, $4, $5, $1, %7; else print
$0 }' < old-password > new-password # this one came from Allen
Johannesen
I feel like a kid in a candy store, thanks to all
reply other threads:[~2000-11-20 20:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox