Uid: Difference between revisions
From Hackepedia
Jump to navigationJump to search
m uid |
m user id mapping to name |
||
Line 1: | Line 1: | ||
UID stands for USER ID, it is a number usually starting at 0 (for [[root]]) and ending at 65535. It can go beyond in some unix like operating systems. | UID stands for USER ID, it is a number usually starting at 0 (for [[root]]) and ending at 65535. It can go beyond in some unix like operating systems. | ||
Every user has a UID when they have a shell on a system. The 'id' command lets you see your USER ID | |||
id | |||
uid=1000(pjp) gid=1000(pjp) groups=1000(pjp), 0(wheel), 553(_saned) | |||
In this case the User ID is 1000. The file that provides a mapping of username to user id is /etc/passwd and /etc/master.passwd in a BSD system (/etc/shadow on SVR4). Some | |||
programs check the mapping between user and userid as in this case: | |||
$ su | |||
su: who are you? | |||
francisco$ id | |||
uid=1000 gid=1000(pjp) groups=1000(pjp), 0(wheel), 553(_saned) | |||
Notice id doesn't map the userid to a username since I changed it in /etc/passwd. |
Latest revision as of 09:03, 30 May 2008
UID stands for USER ID, it is a number usually starting at 0 (for root) and ending at 65535. It can go beyond in some unix like operating systems.
Every user has a UID when they have a shell on a system. The 'id' command lets you see your USER ID
id uid=1000(pjp) gid=1000(pjp) groups=1000(pjp), 0(wheel), 553(_saned)
In this case the User ID is 1000. The file that provides a mapping of username to user id is /etc/passwd and /etc/master.passwd in a BSD system (/etc/shadow on SVR4). Some programs check the mapping between user and userid as in this case:
$ su su: who are you? francisco$ id uid=1000 gid=1000(pjp) groups=1000(pjp), 0(wheel), 553(_saned)
Notice id doesn't map the userid to a username since I changed it in /etc/passwd.