password changing in shell scripting
Hi,
i am using ubuntu 12.04 i working on scripting i want know how to change set of user passwords in shell scripting . |
Welcome to LQ!!!
Would like to mention that we would not write script for you. Let us know what you have prepared so far? Did you have a look at passwd man page? If you want to set same password for a user let say testuser you can use: Code:
echo "password" | passwd testuser --stdin If you want to set random password then you might want to have a look at /dev/urandom + tr. The other tools like fold will depend on the number of characters you want in your password. |
Quote:
|
Welcome to LQ. Please post what you have so far for your script.
|
You may use 'chpasswd' for bulk changing.
|
Can make scripts with autoexpect in some cases too.
|
All times are GMT -5. The time now is 07:03 PM. |