script to lock passwd file

From: J.A. Gutierrez <spd_at_gtc1.cps.unizar.es>
Date: Tue, 21 Nov 2000 12:19:19 +0200 (MET)

>
>
> /usr/sbin/vipw <<xxxFUNNYxxx

        ok, but according to vipw(8), you can't use this on systems
        that use extended security attributes.

        If you have encrypted password data on /tcb/files/auth.db
        I guess your only option is use usermod/useradd/userdel,
        right? (or other graphical tools, I mean, you can't manually
        (nor programatically) manipulate this auth.db)

>
> 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

        BTW, is there a way to manually lock passwd file so users won't
        mess it by running passwd command?

        maybe "touch /etc/ptmp" would be enough?



-- 
finger spd_at_gtc1.cps.unizar.es for PGP       /              So be easy and free
.mailcap tip of the day:                   /      when you're drinking with me
application/ms-tnef; cat '%s' > /dev/null / I'm a man you don't meet every day
text/x-vcard; cat '%s' > /dev/null       /            (the pogues)
Received on Tue Nov 21 2000 - 10:20:35 NZDT

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