LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   how do i add user to a group (http://www.linuxquestions.org/questions/linux-general-1/how-do-i-add-user-to-a-group-153873/)

jogurt666 03-05-2004 02:05 PM

how do i add user to a group
 
i've installed k3b. it uses cdrecord to burn CDs. i can burn them correctly as root. then i run k3b as a normal user, k3b tells me that it cannot find cdrecord (because i have no permissions to use it). i don't want to change chmods. all i have to do is to add my user to cdrom group, but i dunno how should i do that. could anyone tell me?

druuna 03-05-2004 02:12 PM

usermod will do what you want.

man usermod, the -G option.

You should keep this in mind:
If the user is currently a member of a group which is not listed, the user will be removed from the group.

First check if the user belongs to any other groups already (as root: $ id <user>).

PS: This question has been answered before, do try to use the search function first before asking ;)

Qucho 04-02-2004 11:05 PM

to add an user to a specific group you can use:

adduser [username-to-be-added] [existing-group-name]

Example:

adduser druuna audio

In this example the user 'druuna' is added to the group 'audio'. You need to do this as root.

[edit]

I do this in Debian, I am not sure if would be the same in other distros.


All times are GMT -5. The time now is 03:27 PM.