Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.