Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to edit user groups?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
M4A1Carbine
n00b
n00b


Joined: 10 Aug 2004
Posts: 29

PostPosted: Thu Aug 12, 2004 6:50 pm    Post subject: How to edit user groups? Reply with quote

I want to add my main user to the group of 'games' so that I can play games, how does one do that? (I have root access)
Back to top
View user's profile Send private message
Aynjell
Veteran
Veteran


Joined: 28 Jun 2004
Posts: 1117

PostPosted: Thu Aug 12, 2004 6:54 pm    Post subject: Reply with quote

I only know how one would do that in kde. You would open a program in the system folder, Kuser. In that program is an easy wysiwyg way of changing your permissions. Of course this does require root access.
Anyway I will figure out how to alter permissions via 'le olde commande line' seeing as how it is more universal.
But if you are using Kde, Kuser is the way to go.
_________________
CPU: 3800+ X2 (2.5Ghz)
GPU: eVGA 7600GT (640/1700)
MOBO: DFI SLI-DR (Surprisingly good!)
RAM: 2 x OCZ Gold 1024 DDR500 3-4-3-7 (2048)
HDD: Western Digital Raptor
Back to top
View user's profile Send private message
nahpets
Veteran
Veteran


Joined: 05 Oct 2003
Posts: 1178
Location: Montreal, Canada

PostPosted: Thu Aug 12, 2004 6:55 pm    Post subject: Reply with quote

$ man chgrp

[EDIT]

oops :oops: my bad! I meant to say "usermod", but that got changed to "chgrp" somewhere in the brain-keyboard interface. Sorry...


Last edited by nahpets on Thu Aug 12, 2004 7:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
M4A1Carbine
n00b
n00b


Joined: 10 Aug 2004
Posts: 29

PostPosted: Thu Aug 12, 2004 7:11 pm    Post subject: Reply with quote

Aynjell wrote:
I only know how one would do that in kde. You would open a program in the system folder, Kuser. In that program is an easy wysiwyg way of changing your permissions. Of course this does require root access.
Anyway I will figure out how to alter permissions via 'le olde commande line' seeing as how it is more universal.
But if you are using Kde, Kuser is the way to go.


I am using KDE but I don't have a Kuser program anywhere.
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Thu Aug 12, 2004 7:13 pm    Post subject: Reply with quote

vi /etc/group
_________________
The free market gave me gonorrhea.
Back to top
View user's profile Send private message
M4A1Carbine
n00b
n00b


Joined: 10 Aug 2004
Posts: 29

PostPosted: Thu Aug 12, 2004 7:15 pm    Post subject: Reply with quote

papal_authority wrote:
vi /etc/group


That's nice, could you tell me how to edit it without screwing anything up?

I figured it out, thanks!
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Thu Aug 12, 2004 7:20 pm    Post subject: Reply with quote

usermod -G games username

That should do the trick

Use a lower case g to make it the primary group.
Back to top
View user's profile Send private message
nahpets
Veteran
Veteran


Joined: 05 Oct 2003
Posts: 1178
Location: Montreal, Canada

PostPosted: Thu Aug 12, 2004 7:47 pm    Post subject: Reply with quote

msalerno wrote:
usermod -G games username

That should do the trick

Use a lower case g to make it the primary group.


I think you have to list ALL groups again. In your example, "username" will now be part of the "games" group and will be removed from all others.

from "man usermod":
Quote:

If the user is currently a member of a group which is not listed, the user will be removed from the group.
Back to top
View user's profile Send private message
M4A1Carbine
n00b
n00b


Joined: 10 Aug 2004
Posts: 29

PostPosted: Thu Aug 12, 2004 7:48 pm    Post subject: Reply with quote

nahpets wrote:
msalerno wrote:
usermod -G games username

That should do the trick

Use a lower case g to make it the primary group.


I think you have to list ALL groups again. In your example, "username" will now be part of the "games" group and will be removed from all others.

from "man usermod":
Quote:

If the user is currently a member of a group which is not listed, the user will be removed from the group.

Yeah..that's what it does, so now I have to go back in and add them all over again. (Not hard, just kind of a pain)
Back to top
View user's profile Send private message
nahpets
Veteran
Veteran


Joined: 05 Oct 2003
Posts: 1178
Location: Montreal, Canada

PostPosted: Thu Aug 12, 2004 7:51 pm    Post subject: Reply with quote

M4A1Carbine wrote:
nahpets wrote:
msalerno wrote:
usermod -G games username

That should do the trick

Use a lower case g to make it the primary group.


I think you have to list ALL groups again. In your example, "username" will now be part of the "games" group and will be removed from all others.

from "man usermod":
Quote:

If the user is currently a member of a group which is not listed, the user will be removed from the group.

Yeah..that's what it does, so now I have to go back in and add them all over again. (Not hard, just kind of a pain)


That's why I usually use "Kuser", it takes care of all that for you...
Back to top
View user's profile Send private message
gnuageux
Veteran
Veteran


Joined: 17 Apr 2004
Posts: 1201

PostPosted: Fri Aug 13, 2004 11:18 am    Post subject: Reply with quote

Yeah usermod or vim /etc/group usually works for me.
_________________
The realOTW: http://forums.realotw.org/index.php

Registered Linux user#364538
Back to top
View user's profile Send private message
neysx
Retired Dev
Retired Dev


Joined: 27 Jan 2003
Posts: 795

PostPosted: Fri Aug 13, 2004 11:36 am    Post subject: Reply with quote

# vigr
man vigr wrote:
DESCRIPTION
vipw and vigr will edit the files /etc/passwd and /etc/group, respectively. With the -s flag, they will
edit the shadow versions of those files, fI/etc/shadow and /etc/gshadow, respectively. The programs will
set the appropriate locks to prevent file corruption. When looking for an editor, the programs will first
try the environment variable VISUAL, then the environment variable EDITOR, and finally the default edi-
tor, vi.
Back to top
View user's profile Send private message
jounihat
Apprentice
Apprentice


Joined: 26 Oct 2003
Posts: 205
Location: Finland

PostPosted: Mon Aug 30, 2004 11:45 am    Post subject: Reply with quote

emerge kdeadmin

Then you'll have KUser.
_________________
Jouni Hätinen

-There's really only one reasonable OS, and that's Open Source!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum