Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-24-2010, 03:59 AM
|
#1
|
Member
Registered: Sep 2004
Location: Malaysia
Posts: 181
Rep:
|
Differences between UID 0 and GID 0?
Anyone knows the differences between UID 0 and GID 0?
|
|
|
02-24-2010, 04:14 AM
|
#2
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,076
|
uid=user id
gid=group id.
Each uid is unique on a system (usually) but gids(=groups) can have many uids(=users) in them
|
|
|
02-24-2010, 05:02 AM
|
#3
|
Member
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707
Rep:
|
Quote:
Originally Posted by dwarf007
Anyone knows the differences between UID 0 and GID 0?
|
UID 0 refers to root's user ID.
GID 0 refers to group ID of the group root.
When the user account root is created by the system, group root will also be created at the same time with root as a single user in the group root.
You can add your username to root group, provided if you have previliges to do so.
|
|
|
03-15-2010, 10:37 PM
|
#4
|
Member
Registered: Sep 2004
Location: Malaysia
Posts: 181
Original Poster
Rep:
|
Does it mean UID 0 and GID 0 have the same privilege?
|
|
|
03-15-2010, 10:47 PM
|
#5
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
Quote:
Originally Posted by dwarf007
Does it mean UID 0 and GID 0 have the same privilege?
|
No!!
Privileges are assigned to users and to groups independently.
Look at the definition of privileges: There are 3 levels: owner, group, and others. The get the owner privileges, you need to be the owner. To get the group privileges, you need to be a member of the group.
|
|
|
03-15-2010, 11:00 PM
|
#6
|
Senior Member
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
|
actually uid 0 and gid 0 are arbitrary just as the accout name root, however standard on almost all unix/unix like systems
it would theoretically be possible to change the uid and gid of root to something else, albeit probably more difficult then it's worth
|
|
|
03-16-2010, 05:52 AM
|
#7
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,076
|
@dwarf007: Read man chmod - that explains the permission system
|
|
|
All times are GMT -5. The time now is 12:36 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|