script for password change for exiting user

Thread Tools Search this Thread
Operating Systems Linux script for password change for exiting user
# 1  
Old 10-04-2011
script for password change for exiting user

Dear Forum,
In our organization 100 user is existing. Now i want to change password for 100 user in linux server. Pls help to write script for changing password.

# 2  
Old 10-04-2011
#echo "username:newpasswd" | /usr/sbin/chpasswd 
# echo "newpassword" | passwd --stdin username

UNIX/LINUX TECH NOTES: Changing Linux user's password with script
# 3  
Old 10-05-2011
Script for password changing for existing user

Dear Honglus,
Thanks for ur reply.
I want to create a script for password changing which will take password from text file.
Meaning , suppose i will write some password like , user = XYZ password = 1234 in text file.
How can i retrieve the password for rquired user by script ?
Pls help about this regard as soon as possible.

Waiting for feedback.

# 4  
Old 10-05-2011
Should someone point out to you that doing this is ridiculously bad? Clear text passwords are a no-no.
This User Gave Thanks to mark54g For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Not able to change user password

hi I am not able to change user password from root user. although it is saying updated successfully. but still I am not able to login direct to abc user. however I can login from root user by using su - abc # passwd abc Changing password for user abc. New password: BAD PASSWORD: it... (2 Replies)
Discussion started by: scriptor
2 Replies

2. Shell Programming and Scripting

How to change LPad user password?

Hi Gurus, I am lpad user in some of my server. I need to change password at certain period time. I am wondering what is the command to change the passwd. last time I asked my unix admin, they gave me a comand I chagned it. (I forgot to keep it in safe place, I lost it). this time when... (2 Replies)
Discussion started by: ken6503
2 Replies

3. HP-UX

Problem in Change Password for user

Dears, I have a problem When I tried to change password for user in HP unix it gives me this error any one can help to solve this ? bmcaddm@nmssrv05: /home/bmcaddm # passwd Changing password for bmcaddm Old password: New password: Re-enter new password: vxfs: msgcnt 810034 mesg 001: V-2-1:... (8 Replies)
Discussion started by: ahmednoaman
8 Replies

4. Red Hat

password change for user on Redhat 5.6

Hi expert, after creating users on Redhat, i wantn to change their password with something that easy to remember and the way we use. For example #passwd username hello$123 it don't allow me. It may has something to do /etc/pam.d/filesXXXX there which i don't know to change to allow root... (1 Reply)
Discussion started by: lamoul
1 Replies

5. Shell Programming and Scripting

Shell Script to change a user password using script

Hi Experts, I had tried to executes this script to change the user password through script: No lines in buffer #!/bin/ksh cat /etc/passwd | grep -v userid >> /tmp/pass.tmp1 cat /etc/passwd | grep userid >> /tmp/pass.tmp2 PASS1=`cat /tmp/pass.tmp2 | cut -d ":" -f2` PASS2=`q2w3e4r5` sed... (3 Replies)
Discussion started by: indrajit_renu
3 Replies

6. UNIX for Dummies Questions & Answers

Unable To Change a User's Password

I am trying to change a user's Password, but I get the error "Password Cannot be changed; see account Administrator". Yet I am logged in as root. I also cannot access the Accounts Manager facility when SCO when using System Administration screen Error "Unable to get initial list of users" (2 Replies)
Discussion started by: Waitstejo
2 Replies

7. Solaris

User password change trace

In Sun Solaris we have given oracle user for dba that was shared among 5 member. Everytime oracle user password was changed themselves. We want to trace who has changed the password. It is possible. Regards P Manivannan (0 Replies)
Discussion started by: pmsuper
0 Replies

8. UNIX for Dummies Questions & Answers

Can't change password for a user

All, I am unable to change a password for the user called : poller I am logged in as root When I do the following command passwd poller New Password: Permission denied Whe i enter the new password, it gives the above error. When i log in as poller and then execute the command, then... (2 Replies)
Discussion started by: rahulrathod
2 Replies

9. Solaris

Change password - User does not exist

When trying to change the password with the command "passwd" it returns that the user does not exist. passwd <USER> passwd: changing password for <USER> passwd: <USER> does not exist This is a Solaris 2.5.1 system. (7 Replies)
Discussion started by: ryamada
7 Replies

10. UNIX for Dummies Questions & Answers

How would I telnet & change user password automatically in a script

I would like to create a script that logs into a list of several servers 50+ and changes my password all at once. Every 60 days we are required to login to each system and change our passwords or else they expire and our login account is deleted. I have an idea on how I could do this but... (4 Replies)
Discussion started by: darthur
4 Replies
Login or Register to Ask a Question