Crew Changes
Some sailors are leaving the ship and some jobs changed. Update the accounts with sudo: your password is student.
How it works: the terminal below is a real Linux machine running in your browser. Click it and
type. Tasks tick themselves off as you complete them; questions are answered in the box under each task.
Press Reset any time for a fresh machine. Your password on this machine (for
sudo) is student.
Hints
Check each change with getent passwd name, id name or sudo grep name /etc/shadow.
Solution explanation
userdel -r removes the account and /home/tom. passwd -l (or usermod -L) locks Sam's password but keeps everything else. gpasswd -d kim admins takes Kim out of one group only. usermod -s changes the shell and usermod -l the name. The UID stays the same, so Sam still owns his files.
Show solution
sudo userdel -r tom
sudo passwd -l sam
sudo gpasswd -d kim admins
sudo usermod -s /sbin/nologin kim
sudo usermod -l samuel sam