![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to enforce all users to change their password | naw_deepak | SUN Solaris | 3 | 06-26-2009 04:51 AM |
| Help- Change the password of users to common one | Tuxidow | Shell Programming and Scripting | 0 | 06-11-2009 06:21 AM |
| how to change root password using shell script with standard password | kurva | Shell Programming and Scripting | 2 | 02-25-2009 02:35 AM |
| Modify users password via script? | paqman | Shell Programming and Scripting | 2 | 08-21-2007 01:22 PM |
| How do I change users in a script??? | chorgan | Shell Programming and Scripting | 2 | 02-15-2002 11:53 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
script to change password for all users
We have a server where we have a number of user ids and we also have the list of old passwords in a CSV file.
Now we want to change the password of all the users and assign them a default password.Can we write a shell script to do that. I am planning to read the user name and corresponding password from CSV file.But how to login to the server with the same user and change password with passwd -r file command. Once i type login the exported paramter values are lost. Any suggestion or sample script will help. thanks Deepak |
|
||||
|
Code:
user_id,old_password,new_password dkrout,P@55word,dk@11word sdas,P@55word,sd@12word bkpradhan,P@55word,bk@19word pthn,P@55word,pt@11word nsap,P@55word,ns@11word This is a sample CSV file I am having.I want to change the password to new password.I want to make everythin automated so that after the script run is complete password should change for all users and automated mail will be sent to them. ---------- Post updated at 07:44 PM ---------- Previous update was at 07:17 PM ---------- Quote:
Last edited by vgersh99; 08-24-2009 at 10:53 AM.. Reason: code tags, PLEASE! |
| Bits Awarded / Charged to dr46014 for this Post | |||
| Date | User | Comment | Amount |
| 08-24-2009 | vgersh99 | added code tags - charged 3K bits | -3,000 |
|
||||
|
Quote:
---------- Post updated at 10:13 PM ---------- Previous update was at 10:09 PM ---------- Quote:
---------- Post updated at 10:26 PM ---------- Previous update was at 10:13 PM ---------- Quote:
will it work in Sun Solaris too ?? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|