LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Tags used in this thread
Popular LQ Tags ,

Reply
 
Thread Tools
Old 06-12-2009, 08:30 AM   #1
nyce.maan
LQ Newbie
 
Registered: Jun 2009
Posts: 1
Thanked: 0
How to add a single user to more than one group ?


[Log in to get rid of this advertisement]
Hello, I am new to Linux. Can anyone tell me how to add a single user to more than one group ?
nyce.maan is offline  
Tag This Post ,
Reply With Quote
Old 06-12-2009, 08:47 AM   #2
colucix
Guru
 
Registered: Sep 2003
Location: Bologna, Italia
Distribution: OpenSUSE 11.1 CentOS 5.4 VectorLinux 6.0
Posts: 5,134
Thanked: 465
Code:
usermod -G group1,group2,group3,... username
See man usermod for details.
colucix is offline     Reply With Quote
Old 06-12-2009, 08:50 AM   #3
druuna
Senior Member
 
Registered: Sep 2003
Location: netherlands
Distribution: lfs
Posts: 3,269
Thanked: 78
Hi,

With the usermod command you can, among other things, add groups to a user:

usermod -G group1,group2 foobar, this would add group1 and group2 to user foobar.

Look at the usermod manpage for all other options.

Hope this helps.
druuna is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
How to list user in Linux box, add an user to a group! steady_lfcfan Linux - Newbie 8 07-26-2009 12:54 PM
restrict ssh users to single user group winkydo Ubuntu 2 02-25-2008 12:07 PM
how to add a user to a new group? emanresu Linux - Newbie 5 11-21-2005 09:18 AM
add user to group brandnewbie Linux - Newbie 3 08-08-2004 05:53 PM
how can i add a user to a group? doublefailure Linux - General 14 07-10-2002 12:11 PM


All times are GMT -5. The time now is 10:09 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration