LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 12-11-2010, 01:12 PM   #1
katto
Member
 
Registered: Nov 2010
Distribution: Debian lenny
Posts: 41

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

Code:
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

Code:
groups
which gives the groups of the current user it prints out

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

Code:
groups a
it prints out the correct groups

Code:
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, 01:20 PM   #2
alunduil
Member
 
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).

Regards,

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

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

Markus
 
1 members found this post helpful.
Old 12-11-2010, 02:43 PM   #4
katto
Member
 
Registered: Nov 2010
Distribution: Debian lenny
Posts: 41

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


Reply

Tags
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 05:35 AM


All times are GMT -5. The time now is 04:35 AM.

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