Change Password on First Login


 
Thread Tools Search this Thread
Operating Systems Solaris Change Password on First Login
# 1  
Old 06-17-2015
Change Password on First Login

Hi there,

Is there a way to ask the solaris user to change passwordo n the first login. I am looking at how to do this for every single new user.
# 2  
Old 06-17-2015
I assume that you are the sysadmin (root) user???

If so, you can force any user to change their password on their next login.

See the man page for the passwd command and, in particular, the -f switch. If doesn't matter whether the account is new or not.

Code:
 
 # /etc/passwd -f <userid>

Plenty of other 'security' options for the passwd command. Man page can be viewed on this forum.

Hope that helps.
This User Gave Thanks to hicksd8 For This Post:
# 3  
Old 06-17-2015
Quote:
Originally Posted by hicksd8
I assume that you are the sysadmin (root) user???

If so, you can force any user to change their password on their next login.

See the man page for the passwd command and, in particular, the -f switch. If doesn't matter whether the account is new or not.

Code:
 
 # /etc/passwd -f <userid>

Plenty of other 'security' options for the passwd command. Man page can be viewed on this forum.

Hope that helps.
On Solaris systems, the user database is frequently contained in /etc/passwd, but the command needed to change user's passwords and to change password expiration dates is probably /bin/passwd or /usr/bin/passwd; not /etc/passwd.
These 2 Users Gave Thanks to Don Cragun For This Post:
# 4  
Old 06-17-2015
In Solaris there is no difference between /bin and /usr/bin
Code:
ls -ld /bin
lrwxrwxrwx   1 root     root           9 Nov  7  2011 /bin -> ./usr/bin

So is HP-UX
Code:
ls -ld /bin
lr-xr-xr-x   1 bin        bin              8 Jul 20  2010 /bin -> /usr/bin

# 5  
Old 06-17-2015
@Don.....thanks for spotting my stupid mistake. Glad somebody is awake!!
# 6  
Old 06-17-2015
Quote:
Originally Posted by MadeInGermany
In Solaris there is no difference between /bin and /usr/bin
Code:
ls -ld /bin
lrwxrwxrwx   1 root     root           9 Nov  7  2011 /bin -> ./usr/bin

So is HP-UX
Code:
ls -ld /bin
lr-xr-xr-x   1 bin        bin              8 Jul 20  2010 /bin -> /usr/bin

That depends on which Solaris release is being used. Other than the fact that this thread was posted in the Solaris forum, no operating system version has been provided.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Forum Support Area for Unregistered Users & Account Problems

Password sent via reset password email is 'weak' and won't allow me to change my password

I was unable to login and so used the "Forgotten Password' process. I was sent a NEWLY-PROVIDED password and a link through which my password could be changed. The NEWLY-PROVIDED password allowed me to login. Following the provided link I attempted to update my password to one of my own... (1 Reply)
Discussion started by: Rich Marton
1 Replies

2. UNIX for Advanced & Expert Users

Change login password for SFTP Only ID

Hi All, I have an SFTP server where there are user id's created for vendors and given only SFTP access for them (eg: given below) jim.tran:x:10040:10008:abc.def@ghi.com:/dropbox:/bin/false They cannot login to the server via SSH and can only do an SFTP. These users are set up as jailed... (1 Reply)
Discussion started by: nathsaba
1 Replies

3. AIX

Change password to blank password

AIX 6.1 User has a password set. It needs to be a blank password (no password). smit passwd enter user name at change password and confirm password, just press ENTER Afterwards, I could not log on with blank password or with original password. How can I change the password to a... (2 Replies)
Discussion started by: landog
2 Replies

4. Solaris

NIS - Change Password @ first login.

Hi Any body knows how to prompt user to change password on first login in a Solaris NIS client. Thanks HG (3 Replies)
Discussion started by: Hari_Ganesh
3 Replies

5. Solaris

SSH Password-less login fails on password expiry.

Hi Gurus I have a few Sol 5.9 servers and i have enabled password less authentication between them for my user ID. Often i have found that when my password has expired,the login fails. Resetting my password reenables the keys. Do i need to do something to avoid this scenario or is this... (2 Replies)
Discussion started by: Renjesh
2 Replies

6. Shell Programming and Scripting

how to change root password using shell script with standard password

Hi Friends. I am new to scripting now i want to change the root password using the script with standard password. which is the easy scripting to learn for the beginner, Thanks in advance. (2 Replies)
Discussion started by: kurva
2 Replies

7. UNIX for Dummies Questions & Answers

I want to change login failure message, "login incorrect"

I want to change login failure message, "login incorrect" deny user login for user id tom sudo passwd -l tom type username and type password on login prompt and then it will display login failure message "login incorrect" console ############ login: tom password: login incorrect... (2 Replies)
Discussion started by: lifegeek
2 Replies

8. UNIX for Dummies Questions & Answers

Change password by pushing encrypted password to systems

I'm tasked to change a user's password on multiple Linux systems (RH v3). I though copying the encrypted password from one Linux /etc/shadow file to another would work but I was wrong. The long term solution is to establish an openLDAP Directory service, but for now I'm stuck with a manual... (1 Reply)
Discussion started by: benq70
1 Replies

9. UNIX for Dummies Questions & Answers

Password change at login????

I want Red Hat Linux 7.2 prompt for new password at next login time. How can I do this????? passwd -f don't work for linux...... (4 Replies)
Discussion started by: rrivas
4 Replies
Login or Register to Ask a Question