January 2018
Intermediate to advanced
376 pages
8h 45m
English
You could also lock Katelyn's account with:
sudo passwd -l katelyn
This does the same job as usermod -L, but in a slightly different manner. For one thing, passwd -l will give you some feedback about what's going on, where usermod -L gives you no feedback at all. On Ubuntu, the feedback looks like this:
donnie@ubuntu-steemnode:~$ sudo passwd -l katelyn[sudo] password for donnie:passwd: password expiry information changed.donnie@ubuntu-steemnode:~$
On CentOS, the feedback looks like this:
[donnie@localhost ~]$ sudo passwd -l katelynLocking password for user katelyn.passwd: Success[donnie@localhost ~]$
Also, on the CentOS machine, you'll see that passwd -l places two exclamation points in front of the password ...