Linux Labs

Users, permissions, and processes / Stage 6 of 13

Accounts and their lifecycle

Not running Starting usually ~20 s
Leave the lesson

Step 7 of 7 · summary · 2 min

Summary

  • An account is a line in /etc/passwd; the home directory, group, and shell are created by the useradd -m -U -s options.
  • /usr/sbin/nologin blocks logins, while commands run as the account through sudo -u still work: that is how services live.
  • Suspending means the password (passwd -l), the account expiry (usermod --expiredate), the shell, and SSH keys, each on its own; the data and processes stay.
  • The newhire directory at the start of the lesson was left on disk without a line in /etc/passwd: UID 1500 has no name, so ls printed a number and id found no user.
Ubuntu 24.04
Loading…