Download your favorite Linux distribution at LQ ISO.
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 12-11-2010, 02:12 PM   #1
Registered: Nov 2010
Distribution: Kubuntu 10.4
Posts: 46

Rep: Reputation: 16
user and groups problem

I'm running debian lenny and I was trying to add my user account to the usergroup games. So I opened up a root terminal and did

usermod -G games a
which removed all my other groups. I added them back with the same command right after.

The problem is that the group command does not show me in the games group. When I type

which gives the groups of the current user it prints out

a dialout cdrom floppy audio video plugdev netdev powerdev vboxusers
but when I type

groups a
it prints out the correct groups

a dialout cdrom floppy audio video plugdev games netdev powerdev vboxusers
It seems as if I have created a new user with the same id as my user account. Is this possible? Or do I have to logout and login again for it to work?

PS: I did learn eventually that I need to type usermod -a -G to retain my old groups.
Old 12-11-2010, 02:20 PM   #2
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
In order for groups to take effect you do have to login again. `groups` without parameters shows your currently active groups (which should generally equal your groups but in this case doesn't for obvious reasons).


1 members found this post helpful.
Old 12-11-2010, 02:22 PM   #3
Senior Member
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,976

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Well, you're right, changes in the groupmembership take effect after the next login.

1 members found this post helpful.
Old 12-11-2010, 03:43 PM   #4
Registered: Nov 2010
Distribution: Kubuntu 10.4
Posts: 46

Original Poster
Rep: Reputation: 16
Ok that solved it, thanks guys.


adduser, groups, usermod, users

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
Problem adding user to groups an_sush Linux - Newbie 1 12-08-2008 06:35 AM

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