LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-12-2009, 07:30 AM   #1
nyce.maan
LQ Newbie
 
Registered: Jun 2009
Posts: 1

Rep: Reputation: 0
How to add a single user to more than one group ?


Hello, I am new to Linux. Can anyone tell me how to add a single user to more than one group ?
 
Old 06-12-2009, 07:47 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,453

Rep: Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941
Code:
usermod -G group1,group2,group3,... username
See man usermod for details.
 
Old 06-12-2009, 07:50 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
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.
 
  


Reply

Tags
lq


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


All times are GMT -5. The time now is 12:15 PM.

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