LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 04-10-2006, 05:09 PM   #1
max_mad
LQ Newbie
 
Registered: Sep 2005
Distribution: SuSE Linux 9.3
Posts: 21

Rep: Reputation: 15
group - add other groupnames to memberlist SL 9.3


SuSE Linux 9.3


passwd keeps the users user1, user2, user3 ... and their primary group,
for example usegroup = 200

Is it possible to put all the members of usegroup also into the group users = 100 by writing

users::100:usegroup, anotheruser1, anotheruser2, ...

or do I have to write

users::100:user1, user2, ..., anotheruser1, anotheruser2, ...

How many entries fit into a line of members? 1000?

Thanks

Max
 
Old 04-10-2006, 05:40 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
The passwd file contains a list of all of the registered users and the number of each user's primary group. The secondary groups to which any user belongs is in the /etc/group file. This file is organized by having each user group mentioned once. The members of each group are listed on the line for each group name.

For example if you have a user named jim who is in the users group and in the disk group and the video group your files would look something like this.

passwd file:
jim:x:1001:100

group file:
bin:x:1
cdrom:x:20
daemon:x:2
disk:x:6:jim
ftp:x:49
users:x:100
video:x:33:jim

You can see that the passwd file only contains the group number of the primary group to which jim belongs. The group file contains an entry for jim at each group to which he belongs. Groups that have no members have no user names next to them. You may notice that the users group entry in the group file doesn't show any users. This MAY be due to the fact that members of the users group are listed in the passwd file.

Last edited by stress_junkie; 04-10-2006 at 05:48 PM.
 
Old 04-11-2006, 12:49 AM   #3
max_mad
LQ Newbie
 
Registered: Sep 2005
Distribution: SuSE Linux 9.3
Posts: 21

Original Poster
Rep: Reputation: 15
Thank you, this is understood so far, but the question is:

can I put all members for instance form group disk to group video by putting group disk into group video:
disk:x:6: jimmy, van, mick
video:x:33:disk, paul, george, john, ringo

this means the group video has now members: jimmy, van, mick, paul, george, john, ringo

This makes it easier to handle a various number of groups and groups with larger numbers of members.

And how long can the line be for all the members in one group. Is it limited by the number of characters possible in one line? Max number of characters in line = 256
Approx length of name = 6 means max 40 members in one group

Cannot switch to LDAP at the moment yet.

Thank you
 
  


Reply



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
add a group to a group amon Linux - Security 4 04-07-2006 05:48 PM
add group twb2005 Linux - Newbie 5 10-23-2005 09:03 PM
cannot add new group in RH jimberg51 Linux - General 1 06-08-2005 01:13 PM
Add a group to a group? Temujin_12 Linux - Security 2 06-08-2005 03:58 AM
Can't seem to add to group fredws Mandriva 3 11-10-2003 04:09 PM

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

All times are GMT -5. The time now is 03:48 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