Sample Header Ad - 728x90

Is there a file besides /etc/passwd that contains/defines my UID?

11 votes
2 answers
3732 views
Trying to learn about UIDs and GIDs. Various online reading led me to believe that my UID is saved in /etc/passwd, but this doesn't appear to be the case on a server where I work:
$ whoami
user1
$ cat /etc/passwd | grep user1
$
**Is there a(nother) file besides /etc/passwd that could contain my UID?** (I'm assuming UID is similar to GID in that there is a file somewhere that contains it. I've found the GID I'm interested in in the file /etc/group) I know that I can get my UID with the command id -u, but for this question, I'm specifically interested in learning whether there's a _file_ that contains it.
Asked by StoneThrow (1937 rep)
May 12, 2022, 04:42 AM
Last activity: May 13, 2022, 08:08 AM