How to delete user password, disable and lock user in linux

Delete user password

#passwd -d username

Example,
#passwd -d shahzad

Disable user login
# usrmod -s /sbin/nologin username

example,
# usrmod -s /sbin/nologin shahzad

Lock user

#passwd -l username

Example,
#passwd -l shahzad
Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment