0

When I do cat /etc/passwd I see multiple users but when I type in ls -l /home I can see only two users in it.

How to check the issue.

Chris Davies
  • 116,213
  • 16
  • 160
  • 287
Aquig
  • 1

1 Answers1

1
  1. The second last field in /etc/passwd is the users home directory - this can be elsewhere

  2. Root's home directory is usually in /root (because root needs to be able to access when stuff is broken and /home may be on a different drive)

  3. as per comments, system accounts should NOT have a home directory in /home - they are subject to different security rules and perform different functions than human beings.

  4. I have seen instances where a system account has their home dir configured as /home but no directory exists (e.g. syslog on WSL Ubuntu). That's not an issue because this user never logs in / never has interactive sessions

  5. Its quite possible to provision a (normal) user account without creating the home directory at the same time.....but have the home directory created the first time the user logs in - this is does with a PAM module.

symcbean
  • 5,540