LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 02-24-2010, 03:59 AM   #1
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Rep: Reputation: 30
Differences between UID 0 and GID 0?


Anyone knows the differences between UID 0 and GID 0?
 
Old 02-24-2010, 04:14 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 7,565

Rep: Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696
uid=user id
gid=group id.

Each uid is unique on a system (usually) but gids(=groups) can have many uids(=users) in them
 
Old 02-24-2010, 05:02 AM   #3
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
Quote:
Originally Posted by dwarf007 View Post
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.
 
Old 03-15-2010, 10:37 PM   #4
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
Does it mean UID 0 and GID 0 have the same privilege?
 
Old 03-15-2010, 10:47 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by dwarf007 View Post
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.
 
Old 03-15-2010, 11:00 PM   #6
frieza
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,200

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
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
 
Old 03-16-2010, 05:52 AM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 7,565

Rep: Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696
@dwarf007: Read man chmod - that explains the permission system
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is uid and gid rmanocha Linux - Software 9 08-19-2008 12:03 AM
uid,gid from proc sanjaykhuntia Linux - Enterprise 1 10-28-2007 08:50 PM
cifs not using uid and gid mattd7591 Linux - General 10 07-19-2007 12:30 PM
What is my uid/gid? Jeebizz Slackware 2 11-22-2005 12:39 PM
changing uid, gid zeke1955 Linux - General 4 01-10-2004 12:53 AM


All times are GMT -5. The time now is 06:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration