Step 7 of 8 · lab · 20 min
Suspend a user account
An employee is handing over their work. Block password and key logins to their account while keeping its data and running process.
Situation
An employee who worked under the labpaused account is handing over their duties. Until the
handover is done, the account has to be suspended: no one may log in to it, either with the
password or with an SSH key. Deleting it is premature — the home directory holds handover notes,
and a background process of labpaused has been agreed to keep running until the handover ends.
Task
- The
labpausedpassword is locked, and the password itself is neither deleted nor replaced: access must be restorable. - The account has expired — its end date is in the past.
- The login shell is
/usr/sbin/nologin, and the home directory in the record is unchanged. - The key from
/home/labpaused/.ssh/authorized_keysno longer works: there's no active key file, and an exact copy of it sits in/srv/account-review/authorized_keys.saved, readable by root only (ownerroot:root, mode600). - The home directory,
.sshandnotes.txtare in place with their original owner and mode, andnotes.txtis unchanged; other accounts,sudoand SSH settings are untouched. - The background process of
labpausedkeeps running — the same one that was started.
Constraints
- Don't delete the account and don't kill
labpaused's processes. - Account changes need
sudo.
The tools you need are already installed. There's no internet on this machine.
Lab · on your own
No commands are given in this lab: type them in the terminal yourself. Goals are checked on the machine after every command.
Goals
0 of 6-
labpaused's password is locked and the original one is kept — not done yet
-
The account has expired — its end date is in the past — not done yet
-
The login shell is /usr/sbin/nologin and the home directory is unchanged — not done yet
-
The key from authorized_keys no longer works and its copy is readable by root only — not done yet
-
The home directory, .ssh and notes.txt are kept; other accounts and settings are untouched — not done yet
-
The original background process of labpaused keeps running — not done yet
The machine is starting
Hints
0 of 3Lab goals
0 of 6-
labpaused's password is locked and the original one is kept — not done yet
-
The account has expired — its end date is in the past — not done yet
-
The login shell is /usr/sbin/nologin and the home directory is unchanged — not done yet
-
The key from authorized_keys no longer works and its copy is readable by root only — not done yet
-
The home directory, .ssh and notes.txt are kept; other accounts and settings are untouched — not done yet
-
The original background process of labpaused keeps running — not done yet
Goals are checked on the machine after every command.