On Sun, 13 Jan 2002, Thedore Knab wrote: > How would I fix this to generate MD5 passwords ? > Wouldn't it be easier (and more portable) to just use the passwd program to set the password? As you script has to run as root anyway it won't ask for the old password, and you could just write the password that you want to a pipe (as stdin for passwd) [Don't use echo 'examplepass' | passwd user or other constructs like that because of the ps-problem...]
That way the script would still work on systems that don't use MD5/shadow. Dries