21 Nov
2003
21 Nov
'03
16:13
hello, unfortunately, passwd does not accept "--stdin" as a parameter. at least with Suse 9.0. Francois
--- Francois Maisonneuve
wrote: hello,
I'm looking for a way to change a common password for several users in one passe via a script or something else.
does anyone have an idea ?
Assuming you have the usernames mapped into a text file, you could do:
while read username; do echo "newpassword" | passwd --stdin $username done < ./list_of_usernames_in_a_file
You can type the above at the CLI (bash). You'll need root priveliges.
HTH,
-- Thomas Adam
__________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/