Groups of Users UNIX classifies users into groups,
example. The 3 third field holds the group’s unique numeric ID (gid). Many programs use the GID, rather than names, to identify groups. The “wheel” group has a gid of 0. Last is a 4 comma-delimited list of all the users in that group. The users root, mwlucas, and chris are members of the group wheel. Primary Group When you create a new user the system creates a group that contains just that user, and it has the same name as the user. This is the user’s “primary group.” A user is automatically a member of his or her primary group, as listed in /etc/passwd. Some programs can be configured to treat users differently based on their primary group, rather than just general group membership. Changing Group Memberships If you want to add a user to a group, all you need to do is add their username to the end of the line for that group. For example, if I wanted to add “phil” to the “wheel” group, I would add “,phil” to the wheel group description. [3] wheel:*:0:root,mwlucas,chris,phil Creating Groups To create a new group, all you need is a name for the group and a group ID number. Technically, you don’t even need a member for the group; some programs run as a member of a group, and the system uses the group permissions to control those programs just as users are controlled. Traditionally, their group ID lists groups in order. The gid is an arbitrary number between 0 and 32,767. Generally speaking, group IDs below 1,000 are reserved for system administrator use. Programs that need a dedicated group ID usually use one in this range. User accounts have group IDs starting at 1,000 and going up. Some special groups start numbering at 32,767 and go down. You can use any gid you want, but adhering to the standards will make life easier on your coworkers and successors. So, let’s add a group. This sample group is for a database program, so I’m going to call it “db.” I’m arbitrarily adding this custom group with a gid of 5,000, and will start numbering these custom groups from there. I’ll add our database administrator, phil, to this group. db:*:5000:phil That’s it! [3]Mind you, Phil would have to drug me into complete insensibility before I would add him to wheel. But that’s an administrative decision, not a technical one. Page 138
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision tomcat hosting services