RHEL7x – How to lock or disable an user account in Linux
#usermod -L user This will add an exclamation mark “!” in the second field of the file /etc/passwd. or use #passwd -l testuser There are several ways in which user account can be locked or disabled. The posts discusses few of the most widely used ways. 1. Lock the password To lock a users account…