4

There is one user "user1" which I cant find in /etc/passwd but I can execute cmds like

$touch abc
$chown user1 abc
$su user1

These command runs fine, but if I try to chown to some really nonexistent user these chown and su commands fail

I was wondering where is this user1 coming from?

khrist safalhai
  • 560
  • 5
  • 19

1 Answers1

4

While logged in with user1 (after su user1) execute:

getent passwd $USER

This fetches user passwd entries across different databases. All users are not necessarily system users - they can come from LDAP etc. Check docs on getenv.

Also check your nsswitch.conf to see all sources used to obtain name-service information.

hovanessyan
  • 30,580
  • 6
  • 55
  • 83