Resetting user's passwords


 
Thread Tools Search this Thread
Operating Systems Solaris Resetting user's passwords
# 1  
Old 07-18-2007
Resetting user's passwords

Hi all,

I'm developing a script to handle the various actions involved with user admin as root:
Reset password
create a new users
change a users email address, etc

We're in the process of changing over from "telnet" to "SSH" to establish terminal sessions on our Solaris 9/10 servers.

The catch 22 situation I'm finding myself in is this:
Currently (telnet sessions) we reset passwords for users with "passwd -df user-id" command, and that forces the user to enter a new password at the next sign-on.

With SSH on the terminal emulator we're using, the user is prompted for a password BEFORE the session is established to the server. That means that the SSH session authenticates against the old password to the server, and only once a session has been established successfully, is the user prompted for his new password.

Part of the script being developed is to have a crude password generator that generates a password, reset the user-id with that password with a 1 day expiry period, and then forward the password to the user by email. This enables the user to enter a password for SSH to authenticate a session prior to prompting for password change.

Now my gazillion $ question: How do I do this without having to enter a password for the user? (Like "passwd user-id" and then enter a temporary password for that user-id.)

The problem is that by the time a call is logged to us, the user has NO idea of what his password was.

Thanks
# 2  
Old 07-18-2007
Why do you need to get users to change their password just because you change the access protocol? Or is this only for new users?

Did the user not receive the email outside the system?
# 3  
Old 07-19-2007
Porter, thanx for your repsonse.

The users are prompted for a password by the ssh client on their PC.
That's why we need to set a temp password for them, and then mail them that temp passwd to enable them to ssh and establish a session that will them prompt them to change the password.

To set a password for a user the command is (as root)
passwd user-id
passwd then prompts you for a password, and asks you to verify that again.

I don't want to go that route, as that means root has to assign those temp password by hand, which we don't want to do...

I'd like to use "passwd -?? user-id temp-passwd" to set the passwd from within the script.

Thanx
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to change passwords for User accounts on multiple UNIX/Linux machines remotely?

Hello Experts, Need some direction on creating shell script for following environment: We have about 20 people in the team working as Oracle DBA's (sysdba's and appdba's). Total Servers which is a mix of Unix and Linux are 200. We do not have Root user access on any of the servers and... (3 Replies)
Discussion started by: sha2402
3 Replies

2. UNIX for Dummies Questions & Answers

Unable to change domain user passwords

Hi, I'm new to this site, so my apologies if this is posted to the wrong board. I'm the student administrator of a small computer science lab (20 Win 7 PCs) at a university. The logins to the PCs are handled by samba (v. 3.5.8) on a CentOS server (kernel v. 2.6.9-100.ELsmp). Recently I ... (1 Reply)
Discussion started by: kerona
1 Replies

3. UNIX for Advanced & Expert Users

When did UNIX start using encrypted passwords, and not displaying passwords when you type them in?

I've been using various versions of UNIX and Linux since 1993, and I've never run across one that showed your password as you type it in when you log in, or one that stored passwords in plain text rather than encrypted. I'm writing a script for work for a security audit, and two of the... (5 Replies)
Discussion started by: Anne Neville
5 Replies

4. UNIX for Dummies Questions & Answers

Change user passwords using shell script

Hi, I want to change the password of unix users on a number of servers.My plan was to ssh to all the servers in a shell script and use the passwd command. I tried to do so but everytime i run it i get this error. ssh -x -n -l user1 host passwd Changing password for "user1" 3004-709 Error... (3 Replies)
Discussion started by: poojabhat
3 Replies

5. Solaris

New User to Reset Passwords

Hi, Apologies for my first post being a question. Long time reader, first time registered. I'm trying to create a new user in Solaris who can reset passwords of other users. It will be held by IT, and I'm not too bothered about it having similar priveledges to root as i'm just using it so i... (3 Replies)
Discussion started by: MrGrim
3 Replies

6. Shell Programming and Scripting

script to change passwords for the same user on multiple servers

I am trying to write a script to change passwords for the same user on multiple servers. My environment runs purely ssh / scp not rsh / rcp and therefore coping using rcp is not an option. I have been playing with expect to perform tasks but think there must be a better way. Has anyone got... (7 Replies)
Discussion started by: stolz
7 Replies

7. UNIX for Dummies Questions & Answers

single user mode - user accounts passwords

hello ppl, someone must be able to help with this --> I have an old NCR tower 32 with an ADDS terminal running a unix version 020102 (Im not sure if thats correct but its unix for sure). I have no user names and no passwords and need to login to read a tape. Is there any way to do that? I hear... (3 Replies)
Discussion started by: orestis
3 Replies

8. UNIX for Dummies Questions & Answers

su - user... how to find out the list of users and their passwords..

hi, to do a su - user, we need to know what are the users... so in unix 1) which file to see the list of users, passwords? (2 Replies)
Discussion started by: yls177
2 Replies
Login or Register to Ask a Question