LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 07: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, 07:11 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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, 07:12 AM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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 07:14 AM.
 
Old 05-15-2003, 04: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, 05:00 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:05 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
Open Source Consulting | Domain Registration