Which of the following commands will lock the user foobar’s account?
A.
userdel -r foobar
B.
moduser -l foobar
C.
usermod -L foobar
D.
userconf -l foobar
Explanation/Reference:
From the man pages:
usermod – modify a user account
-L, –lock Lock a users password. This puts a ! in front of the encrypted password, effectively disabling the password. You cant use this option with -p or -U.