Linux Labs

Users, permissions, and processes / Stage 6 of 13

Accounts and their lifecycle

Not running Starting usually ~20 s
Leave the lesson

Step 1 of 7 · on a machine · 4 min

A directory, but no user

What you will learn

  • Create an account with an explicitly set home directory and shell.
  • Tell an ordinary user, a service account, and a blocked interactive login apart.
  • Explain what locking a password does and does not cover, and plan how to keep the data.

A new intern writes: "My directory in /home is already there, so the newhire account must have been created. Could you check that I can log in?"

Look at what is in /home, and ask the system about newhire itself.

Exercise · look

Whose directory is this

Look at what is in /home and ask the system about the user newhire.

First, predict

There is a newhire directory in /home. What will id newhire print?

Now start the exercise, run the command and compare your prediction with the output.

Sign in and start The machine is available after signing in
Check yourself 1 question

Why did ls -l print the number 1500 as the owner of the newhire directory instead of a name?

  • ls -l / prints the owner root by name, though those directories are not yours. A number appears where a UID has no name.

  • There is no one to log in: id newhire found no such user. The name will appear once UID 1500 has an account.

  • The directory is intact: ls read its mode and size. A directory never stores the owner's name, only the number.

The directory's owner is recorded as number 1500, and no user has that UID, so there is no name to show.

Ubuntu 24.04
Loading…