February 2020
Intermediate to advanced
666 pages
15h 45m
English
You could also lock Katelyn's account with this:
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, whereas 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 katelyn Locking 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 ...