1

Change linux password in a script, quietly

view story
linux-howto

http://stackoverflow.com – As part of trying to implement a security measure in my root ssh session, I'm trying to devise a method of starting a script after n seconds of root user login, and change the user password and logout the user automatically. I'm getting stuck at trying to change the password silently. I have the following code: echo -e "new\nnew" | passwd -q This instead of changing the password "quietly" as mentioned in man pages, outputs this: ~/php-pastebin-v3 #echo -e "new\nnew" | passwd -q Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully which doesnt help muc (HowTos)