Ted Harding:
$ for user in `cat usernames`; do usermod -p $user $user; done
Not sure this will help, since it looks as though the password argument to usermod -p has to be already encrypted:
Thanks to Adam:
for user in $(cat usernames); do usermod -p $(mkpasswd $user aa) $user done
On Mon, Jan 21, 2002 at 03:34:38PM +0000, MJ Ray wrote:
Ted Harding:
$ for user in `cat usernames`; do usermod -p $user $user; done
Not sure this will help, since it looks as though the password argument to usermod -p has to be already encrypted:
Thanks to Adam:
for user in $(cat usernames); do usermod -p $(mkpasswd $user aa) $user done
awwwww... how boring, all salted with the same salt, that's no fun :p
Brett.
Brett:
for user in $(cat usernames); do usermod -p $(mkpasswd $user aa) $user done
awwwww... how boring, all salted with the same salt, that's no fun :p
But nicely formatted, not using deprecated syntax (although that ought to say $(<usernames) rather than $(cat usernames), thinking about it), no gratuitous perl and it doesn't matter about the salt as the passwords are bleedin' dangerously obvious anyway. It's not too hard to format $RANDOM for the salt if you really want to, anyway.