SUMMARY:script to change passwd file

From: Jerry Brady <jerry.brady_at_faypwc.com>
Date: Mon, 20 Nov 2000 15:37:02 -0500

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
Received on Mon Nov 20 2000 - 20:37:29 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT