Home » Centos/RHEL » How to lock and unlock user on linux system

How to lock and unlock user on linux system

This article will help to lock and unlock user on linux system

root@server [~]#passwd -l gthomas
Locking password for user gthomas.
passwd: Success
root@server [~]# grep user /etc/shadow
gthomas:!!$1$YKoF7EbU$zXqSSlKelclFLn0LDR/YM0:16063:0:99999:7:::
root@server [~]#passwd -u gthomas
Unlocking password for user gthomas.
passwd: Success
root@server [~]#grep gthomas /etc/shadow
gthomas:$1$YKoF7EbU$zXqSSlKelclFLn0LDR/YM0:16063:0:99999:7:::

About

I am founder and webmaster of www.linuxpcfix.com and working as a Sr. Linux Administrator (Expertise on Linux/Unix & Cloud Server) and have been in the industry from last 7 years.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Time limit is exhausted. Please reload the CAPTCHA.

Categorized Tag Cloud