LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 05-14-2003, 06:01 AM   #1
debdas
LQ Newbie
 
Registered: May 2003
Posts: 19

Rep: Reputation: 0
administrator help


Is there any way i can list all the user groups on the system, not using the GUI interface...i need to get all the user group names as part of a program I'm working on...

I'm in the system administrator mode...

I need to read all the user groups into a user interface that I'm creating...

Thanks

Debdas
 
Old 05-14-2003, 06:11 AM   #2
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Sounds very... suspicious. However, it's really not that big of a deal I guess if you've already cracked into the system with root access...

Anyway, the users are listed in /etc/passwd
You can view this by typing:
cat /etc/passwd
OR
less /etc/passwd

Cool
 
Old 05-14-2003, 06:12 AM   #3
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
If you want to view the groups (if I have read your question wrong the first time), the file is:
/etc/groups
And to find which ones are user(s) groups normally these are 500+. However, you could also compare your UID's with corresponding GID's.

Cool

<edit>
And you shouldn't post your question in more than 1 forum. I understand you "reworded" it, however it's virtually the same question.
</edit>

Last edited by MasterC; 05-14-2003 at 06:14 AM.
 
Old 05-15-2003, 03:30 AM   #4
debdas
LQ Newbie
 
Registered: May 2003
Posts: 19

Original Poster
Rep: Reputation: 0
re:

I know that /etc/passwd contains the group names and that 500+ group ids are user group ids. But they can be modified to any number... So how can I be sure that they are actually user group ids only.

I changed the group id of a user group to a number less than 500(81 precisely) and found that the Users and Groups interface under System Tools did not display the user group. Why????

I need only the user group names to store some data corresponding to each group in a file that is similar to /etc/passwd. I am trying to develop an interface that will recognise all the user groups existing on the system and read certain data associated with each user group.

Why is this so suspicious ????
 
Old 05-15-2003, 04:00 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,397

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
well it didn't show the users as you changed the GID to less 500, that *IS* the reason. it ranges of numbers are a convention that works pretty well as long as it is respected. not all rules are there to be broken... sure you can change the gid to whatever you want, but you shouldn't.. just like you should ever run "cat /dev/random > /dev/hda1"...
 
  


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
Administrator Megos Linux - Newbie 12 06-11-2007 11:55 PM
Contact your administrator HeLGeNx Fedora 3 04-10-2005 10:58 PM
running os x as administrator grimslater Other *NIX 2 02-09-2005 02:14 PM
MySQL Administrator eva Linux - Software 3 08-28-2004 10:54 PM
Webcalendar2.8.7 Administrator NIT Programming 1 10-21-2003 12:27 AM


All times are GMT -5. The time now is 01:19 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration