Showing posts with label passwd. Show all posts
Showing posts with label passwd. Show all posts

Thursday, 16 January 2014

Password in History List

I logged on to a Solaris server as user oracle and was prompted to change its password. I was in a hurry so I tried to reuse the old password. This failed so I had to use a new one:
 
Password:
Warning: Your password has expired, please change it now.
 
New Password:
sshd-kbdint: Password in history list.
 
New Password:
Re-enter new Password:
sshd-kbdint: password successfully changed for oracle
 
We store our passwords in a spreadsheet which can only be accessed by certain people. A colleague had locked this and gone home so I could not update it with the new password. I tried to reinstate the old password from within the UNIX session but failed again for a different reason:
 
Solaris:oracle passwd
passwd: Changing password for oracle
Enter existing login password:
passwd: Sorry: less than 7 days since the last change.
Permission denied
Solaris:oracle
 
I logged on as root and this time I was able to reuse the old oracle user password:
 
Solaris:root passwd oracle
New Password:
Re-enter new Password:
passwd: password successfully changed for oracle
Solaris:root

Monday, 14 January 2013

How to Tell if a UNIX User is Locked

You can check if a UNIX user is locked with the passwd -s command, followed by the username. If the letters LK appear at the start of the output, after the username, the user is locked:

Solaris root user > passwd -s oracle
oracle    LK    06/15/12     7    56     7
Solaris root user >

You can unlock a user with the passwd -u command, followed by the username:


Solaris root user > passwd -u oracle
passwd: password information changed for oracle
Solaris root user>

After unlocking the user, the letters PS replace the letters LK in the output of the passwd -s command. This simply means that the user has a password:


Solaris root user > passwd -s oracle
oracle    PS    06/15/12     7    56     7
Solaris root user >

In Spanish / en espaƱol