Unlock RHEL Account with Faillock

RHEL Unlock

In RHEL (Red Hat Enterprise Linux), you can unlock a locked user account using the faillock command. The faillock utility is used to display and modify the login failure records, including unlocking user accounts. Here’s how you can do it:

  • Open a terminal.
  • Switch to the root user or use a user with administrative privileges.
  • To view the status of locked user accounts, run the following command:
    faillock --user <username>
    

    *Replace with the username of the account you want to unlock.*

  • If the user account is locked, you will see the account information with the “Account locked” status. To unlock the account, run the following command:
    faillock --user <username> --reset
    

    *Replace with the username of the account you want to unlock.*

  • After executing the command, the account will be unlocked, and you will see a success message indicating that the user account has been reset.
  • To verify the account status, you can re-run the **faillock –user ** command. The status should now show as "Account not locked." That's it!!! You have successfully unlocked a locked RHEL user account using the faillock command. Remember to replace with the actual username of the account you want to unlock...