openssl passwd -1 test01 output = $1$q.C/Xn5Q$AkvYZAwzTkpGF.Q9O/NC90 usermod -p $1$q.C/Xn5Q$AkvYZAwzTkpGF.Q9O/NC90 your_username
i hope this can be enough :-) 2010/8/10 Jordon Bedwell <[email protected]>: > On Tue, 2010-08-10 at 01:52 +0000, T o n g wrote: >> Hi, >> >> What's the easiest way to set password for user account via script? >> The most common tool would be fine, even if it means that the password >> has to be clear text. >> >> Thanks >> >> -- >> Tong (remove underscore(s) to reply) >> http://xpt.sourceforge.net/techdocs/ >> http://xpt.sourceforge.net/tools/ >> >> > > You can write passwords directly to /etc/shadow as root, but it's rather > dangerous to do, but I shouldn't be here to warn you and caution you > since you should already know all this, on to the example: > > echo "user_password"|openssl passwd -1 -stdin > $id$salt$encrypted_password > > root:$1$RsTbBahJ$2NjYxhHostQUasMcczo1T0:14824:0:99999:7::: > > > -- > To UNSUBSCRIBE, email to [email protected] > with a subject of "unsubscribe". Trouble? Contact [email protected] > Archive: http://lists.debian.org/1281409266.14430.123.ca...@envygeeks > > -- esta es mi vida e me la vivo hasta que dios quiera -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

