Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-14-2009, 09:00 AM   #1
Registered: Sep 2009
Posts: 31

Rep: Reputation: 15
Group Questions


I was working with groups last night and came across a few questions.

1. Why do you need a GID?
2. Why would a group need a password?
3. What is the proper way to add a user to a group? Some of the materials I was using were telling me to use "groupmod" while others were telling me to use "useradd -G". I got errors on both.

Old 10-14-2009, 09:30 AM   #2
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
1. Not sure what you mean, why GID or why groups - let's answer both:
Groups are needed to give several accounts same permissions. For instance, all users that shall have access to sound are members of the "audio" group. Without groups that would be pretty difficult to accomplish.
GID:s - well, 'puters uses numbers not names, names are for humans.
It's the same with UID - it doesn't really matter what name an account has it's the uid that actually is set.

2. AFAIK it's not really needed - I have never seen a password actually being used for a group. Can't swear on this though, maybe sometimes they're actually used?

3. "The proper way" to do whatever it is, is the way you feel is the best for you.
For group membership all that's needed is to add the user to the group in the file /etc/group.
It looks like this:
So that's groupname: password or not:gid:members
As you can see here, harald & pingu both has access to cd, floppy and audio. Only pingu has access to tape drive. No user can use sudo.

There are several tools (gui & text) to handle users & groups, try a few and use whatever you like (as long as it works of course). If you get errors it could be either a lousy app or (more likely) you are actually doing something wrong. Post the error here if you need help!


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
CentOS Local Repo questions (Group Install) Swakoo Linux - General 1 09-09-2009 11:29 PM
Multiple file/group permission questions JustinCoyan Slackware 3 04-19-2005 10:26 PM
Starting Linux user group questions Artimus General 4 08-17-2004 10:25 PM
Two Questions: autologin to X, and setting the adding a user to a group. Cobra133 Slackware 8 06-01-2004 02:43 PM
user group questions Abe_the_Man Slackware 5 01-10-2004 11:09 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:24 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration