Find the answer to your Linux question:
Results 1 to 5 of 5
Hello If user password is expired then the request from the user is to provide the same password so how can we resolve....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    vrk
    vrk is offline
    Just Joined!
    Join Date
    Jun 2012
    Posts
    16

    How to give the same password which expired


    Hello

    If user password is expired then the request from the user is to provide the same password so how can we resolve.

  2. #2
    Just Joined!
    Join Date
    Jun 2012
    Posts
    9
    Hi,

    First of all this would most likely be a violation of the security rules in your company. Password expiration is there with a reason.

    But if you want to go ahead and just unlock his account, do the following:
    Code:
    vi /etc/passwd
    look for the username of the user
    the line will be something like this:
    Code:
    test:$6$ZFbSDzK0$8vCEBW.iTKx9lfbaTro.S/qAexmt/aYLa8NC8PDSsQP9dtiODTgZtWmkKxHAU8Z/zu5SOR9OyzOymrLvBN5xz1:15748:0:99999:7:::
    change the value that is in the same place as where 15748 is in the line above. Do NOT change anything else.

    Your user will now be able to log in with the old password

  3. #3
    Linux Newbie
    Join Date
    Jan 2013
    Posts
    116
    its should be in /etc/shadow

    /etc/shadow format as below

    user name :encrypted password : last modified :min change : max change days : warn days : disable days : disable time : reserved

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined! msohail's Avatar
    Join Date
    Nov 2011
    Posts
    47
    Quote Originally Posted by Nightshadow View Post
    Hi,

    First of all this would most likely be a violation of the security rules in your company. Password expiration is there with a reason.

    But if you want to go ahead and just unlock his account, do the following:
    Code:
    vi /etc/passwd
    look for the username of the user
    the line will be something like this:
    Code:
    test:$6$ZFbSDzK0$8vCEBW.iTKx9lfbaTro.S/qAexmt/aYLa8NC8PDSsQP9dtiODTgZtWmkKxHAU8Z/zu5SOR9OyzOymrLvBN5xz1:15748:0:99999:7:::
    change the value that is in the same place as where 15748 is in the line above. Do NOT change anything else.

    Your user will now be able to log in with the old password
    Or if you have root access, simply use passwd command along with the username and you will have your old password back.

    Jazak Allah
    Sohail

  6. #5
    Linux Enthusiast meton_magis's Avatar
    Join Date
    Oct 2006
    Location
    arizona
    Posts
    699
    instead of editing the /etc/shadow file manually, I suggest you read the man page for the chage command.

    Code:
     man chage
    and by running
    Code:
     passwd -S username
    to get the current details.

    If you set the maxage to -1, you can disable account expiry, or make it larger to postpone the forced change.
    New to the internet, technical forums, or the hacker / open source community??
    Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html

    RHCE for RHEL version 5
    RHCT for RHEL version 4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •