Showing posts with label user admin. Show all posts
Showing posts with label user admin. Show all posts

Thursday, September 29, 2016

Quickly update user password in an automated fashion


 Helpful when updating a user password in a script for small test clusters:

$  ssh remoteserver 'useradd newuser;  $PASSWD_COMMAND'

where $PASSWD_COMMAND  is one of the following:

    echo -e "newpassword\newpassword" | passwd newuser

    echo "newuser:newpassword" | chpasswd


    echo "newpassword" | passwd --stdin newuser