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.
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.
The second last field in /etc/passwd is the users home directory - this can be elsewhere
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)
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.
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
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.
cat /etc/passwd
? – muru Jan 18 '24 at 05:25/home
. Also, users do not have to come from/etc/passwd
. If you provide some context as to what you are attempting to achieve, we may be able to provide some solutions. – GracefulRestart Jan 18 '24 at 06:03