On Red Hat you can do this echo password | passwd --stdin username I know that the password will remain in the shell history, but I don't care about that on certain systems, I know what I'm doing. On SuSE (8.1), the passwd utility does not have the --stdin option. Is there a reason why this option it's not a Good Thing? I want to write to feedback@suse, but I want to make sure first that I don't bother them for nothing. -- Linux/Unix Systems Engineer http://www.genesys.ro Phone +40723-267961
* Silviu Marin-Caea (silviu@genesys.ro) [030418 04:18]:
echo password | passwd --stdin username
I know that the password will remain in the shell history, but I don't care about that on certain systems, I know what I'm doing.
On SuSE (8.1), the passwd utility does not have the --stdin option.
Is there a reason why this option it's not a Good Thing?
The reason you pointed out plus if the passwd has any control characters in it your shell might freak out. You can use mkpasswd(1) with some sed to mimic the redhat one, -- -ckm
participants (2)
-
Christopher Mahmood
-
Silviu Marin-Caea