tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY:script to change passwd file
@ 2000-11-20 20:37 Jerry Brady
  0 siblings, 0 replies; only message in thread
From: Jerry Brady @ 2000-11-20 20:37 UTC (permalink / raw)
  To: tru64-unix-managers

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-11-20 20:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-20 20:37 SUMMARY:script to change passwd file Jerry Brady

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox