[csw-maintainers] passwd -N

Dagobert Michelsen dam at opencsw.org
Wed Oct 7 14:41:31 CEST 2009


Hi Ben,

Am 06.10.2009 um 19:12 schrieb Ben Walton:
> Is anyone aware of a clever alternative to solaris 10's `passwd -N`
> for munging the password field in a shadow file?  Ultimately, I'd
> prefer not to twiddle the file with sed, but that seems to be the best
> option I've found.

Yes. It may be a little clean with awk:
   awk -F: 'BEGIN { OFS=":" } $1 == "dam" { $2 = "NP" } { print }' < / 
etc/shadow


Best regards

   -- Dago



More information about the maintainers mailing list