Review your favorite Linux distribution.
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 06-09-2004, 05:31 AM   #1
LQ Newbie
Registered: Jun 2004
Distribution: Crux, Debian, Fedora, Slackware
Posts: 3

Rep: Reputation: 0
Red face Adding user to group makes me CRAZY!!!

I'm trying to add a user to a group with no success.

For example:
nugator@debian1:/var/local$ groups nugator
nugator : nugator cdrom floppy audio video
nugator@debian1:/var/local$ groups
nugator dialout cdrom floppy audio video

Why does "groups" and "groups nugator" give me two different outputs????
Is nugator a member of the dialup group or not???
Is this a bug or a feature?

I know I've had this problem before. When does changes to the /etc/group
set in? Do I have to restart som process or is it instantly?

Thanks for ANY help!
Old 06-09-2004, 07:11 AM   #2
Registered: May 2004
Location: Vienna, Austria
Distribution: Open SuSE 11, Mac OS X 10.5
Posts: 299

Rep: Reputation: 33
groups is more or less the same like id -Gn.

When you call
id -Gn user_name
then all groups are displayed the user belongs to. So far so good.

If you call
id -Gn
(so without a user as aparameter) the group membership of the current process (so your shell) is displayed.
If you change, the /etc/group this change does not get reflected to the already started processes.

Now when you are logged in as an user and su to root in order to edit /etc/group,
then you *have* to logout and login again so changes take effect and all new started
processes belong also the newly added group.

Last edited by Vlad-A; 06-09-2004 at 07:19 AM.
Old 06-09-2004, 07:28 AM   #3
Registered: May 2004
Location: Vienna, Austria
Distribution: Open SuSE 11, Mac OS X 10.5
Posts: 299

Rep: Reputation: 33
So in your particular case:
groups nugator
does *not* display dialout as a groop => nugator is *not* a member of the dialout group.

groups user_name
reflects immediatly the changes in the group membership of a particular user, without
need to re-login.

The user who started the shell and invoked the groups (without user as parameter) command
is a member of the dialout group.


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
adding user to group ryancoolest Linux - Newbie 9 04-14-2008 01:50 PM
adding user to wheel group tied2 *BSD 10 09-28-2007 05:22 AM
Adding new group to existing user ALF Linux - Software 7 05-08-2006 10:35 PM
after adding user to group peter72 Linux - General 2 08-01-2005 11:17 AM
adding user to a group Chilipepa Linux - Newbie 2 09-27-2003 12:08 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:56 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration