Is it possible to write a script to reset user's password?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Is it possible to write a script to reset user's password?
# 1  
Old 02-25-2008
Is it possible to write a script to reset user's password?

Is there anyway that I can reset user's password using a script/ssh command?
ie. emulate passwd command with a default password of abc123 or even null value?

> ssh server1 pwdadm user1 < /dev/null
or
> ssh server1 passwd user1 < /dev/null

neither worked for me.. but you know what I mean... I couldn't emulate enter keys.

I know this method is not recommended, but I've got more than 40 servers, and I don't want to login to every server to reset passwords.

Thanks in advance.
# 2  
Old 02-25-2008
You may want to check out NIS.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Giving password reset access to non-root user, in LDAP

Hi, We have two LDAP servers. Whenever we get a ticket to reset the password, we login to LDAP primary server and reset the password. For below example, I logged into primary LDAP server and resetting password to john to Welcome123# We are giving this work to tier-1 team, so that they can reset... (1 Reply)
Discussion started by: ron323232
1 Replies

2. Red Hat

User password reset

Hello - I want to reset user password in multiple server via root ID. I have passwordless authentication for root between all the servers. I an use loop to reset the password. I am using below command in loop echo mypassword | passwd username --stdin However, if anyone sees history - he... (5 Replies)
Discussion started by: saurabh84g
5 Replies

3. Homework & Coursework Questions

Need to write a script user.sh that parses name & password

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a script called user.sh that parses the name and password of given in a file (user.txt) and creates the user... (1 Reply)
Discussion started by: Nygenesis
1 Replies

4. Shell Programming and Scripting

Password reset script

Hi all, I am using an command which reset the password for the user, its working fine on Solaris boxes but sometimes the samw was not happening on some of linux boxes. /bin/echo username | passwd --stdin username I am new to unix and shell scripting,so it would be very helpful for me... (1 Reply)
Discussion started by: sudharson
1 Replies

5. Solaris

how to Remote Reset Password for User ?

Hello, everyone i have a little scenario and would like help , SCENARIO OS : SunOS 5.10 Shell: KSH UserName 1 connects to Server1 .He should run a little command or somthing to server2 that Resets the password of user2. i have tried this : ssh user@server2 '/usr/local/bin/sudo passwd... (2 Replies)
Discussion started by: shatztal
2 Replies

6. Shell Programming and Scripting

how to Remote Reset Password for User ?

Hello, everyone i have a little scenario and would like help , SCENARIO OS : SunOS 5.10 Shell: KSH UserName 1 connects to Server1 .He should run a little command or somthing to server2 that Resets the password of user2. i have tried this : ssh user@server2 '/usr/local/bin/sudo passwd... (0 Replies)
Discussion started by: shatztal
0 Replies

7. Shell Programming and Scripting

Need to write script to send an email for password reset.

Hi all, Please suggest I want to write a scritp which will send a email to my mail address before the time duration of the password reset, Should write mail stating that your password will expire in so and so days"" Rgds:b: Ann. (2 Replies)
Discussion started by: Haque123
2 Replies

8. Solaris

LDAP user password reset script

Hey all, I'm looking for a script to auto-generate a password for users that forget their password. Currently, we are using a perl script (with cgi-bin) where users update their password, but would like to add to this and make it so that the users can also request a password reset and a... (1 Reply)
Discussion started by: em23
1 Replies

9. Solaris

unable to reset user password

hi, i am unable to reset one of my server user password. whenever i make a "passwd username" i get the following error ======================================== New Password: Re-enter new Password: Permission denied ======================================== please advise.thanks... (6 Replies)
Discussion started by: cromohawk
6 Replies

10. Solaris

Looking for a script to reset password

All, I have a Solaris 9 system and I would like to create a script that would reset the password of a local user to something specific on a daily basis. Someone suggested the following: passwd --stdin username < passwd_file However, this doesn't work on Solaris. Does anyone know of... (3 Replies)
Discussion started by: soliberus
3 Replies
Login or Register to Ask a Question