You are not logged in.
I found
# echo "somewords" | passwd --stdin username
won't work. So what should be used instead of that option "--stdin " ? Or do you have any other way of doing it?
Last edited by 2XEKmkZd4C6PeYdgmuiHL6xaj (2018-02-21 15:09:29)
Offline
Where did you get "--stdin" from? passwd reads from stdin by default. But you do need to enter the password twice. I don't know if this is the best way, but this works:
printf "somewords\nsomewords\n" | passwd username
Actually there is a tool specfically for scripted password changes: `chpasswd`. Use that:
echo username:somewords | chpasswd
Last edited by Trilby (2018-02-21 14:55:46)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Thanks a lot.
Offline