GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Operating System  >  Shell Scripting
Go To First  |  Previous Question  |  Next Question 
 Shell Scripting  |  Question 44 of 47    Print  
UID and GID
What does UID and GID signify?


  
Total Answers and Comments: 3 Last Update: October 29, 2009     Asked by: super_sixes 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: UncaAlby
 
User ID and Group ID. They are used for a first-cut security in Unix systems, in that files and programs can be restricted to certain groups, or to certain users.  Groups are kept in the /etc/group file, users and the group they belong to are kept in the /etc/passwd file.

Above answer was rated as good by the following members:
frmontoya, niranjanvk
October 22, 2008 00:54:32   #1  
UncaAlby Member Since: October 2008   Contribution: 13    

RE: UID and GID
User ID and Group ID. They are used for a first-cut security in Unix systems in that files and programs can be restricted to certain groups or to certain users. Groups are kept in the /etc/group file users and the group they belong to are kept in the /etc/passwd file.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
April 28, 2009 09:09:09   #2  
Vijaymorey Member Since: April 2009   Contribution: 3    

RE: UID and GID
UID - User id
GID - Group id

We can find out using sample command fire @ $ promoit id you will user id & group id.
e. g step 1 : $ id ---> O/p get display immediately
uid 232(vijay) gid 1(staff)

This is actually string in the /etc/password user id 232 and group 1 user home directory :/users/vijay:/usr/ and shell is ksh

vijay:!:232:1:Vijay:/users/vijay:/usr/bin/ksh

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
October 26, 2009 12:06:36   #3  
swetha_0505 Member Since: October 2009   Contribution: 4    

RE: UID and GID

To find a user's UID or GID in Unix use the id command.


To find a specific user's UID at the Unix prompt enter:

id -u username

Replace username with the appropriate user's username.


To find a user's GID at the Unix prompt enter:

id -g username


If you wish to find out all the groups a user belongs to instead enter:

id -G username


If you wish to see the UID and all groups associated with a user enter id
without any options as follows:

id username



 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape