LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 05-30-2009, 04:35 PM   #1
Allanitto Newbee
Member
 
Registered: Oct 2007
Location: Montreal
Distribution: Slackware12;Slackware13
Posts: 106

Rep: Reputation: 15
Smile how to add additional more group to an existing user


Hi,

How to add an existing user to a particular group like ftp?


Thanks
 
Old 05-30-2009, 04:42 PM   #2
puntjuh
Member
 
Registered: Apr 2006
Location: holland
Distribution: Gentoo / debian / suse / mint
Posts: 558

Rep: Reputation: 41
Too add an existing user to a group, use the following line, taking ftp group as an example:

usermod -Gftp puntjuh

where puntjuh is changed to the appropriate user and ftp to the appropriate group.

This will add the user to a new group.

If you want to change the users primary group, you use a non-capital g instead of the capital G.

Good luck!
 
Old 05-30-2009, 04:43 PM   #3
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 241

Rep: Reputation: 45
Check out the man page for "adduser"
 
Old 05-30-2009, 11:20 PM   #4
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 36
usermod -G <secondary_group> <username>
eg.usermod -G sales saagar
This command has a problem...If you want to add one more secondary group to saagar, say culturals group, then
if we do
usermod -G culturals saagar,
and now if you type

id saagar,

then you will see only culturals as saagar's secondary group and sales is lost.
so i think follwing is the better way:

gpasswd -a saagar sales
gpasswd -a saagar culturals.

id saagar
now saagar will be in both sales and culturals secondary groups.
 
Old 05-30-2009, 11:55 PM   #5
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I think you guys may mean

usermod -a -G ftp user

or similar don't you?
 
Old 05-31-2009, 08:41 AM   #6
Allanitto Newbee
Member
 
Registered: Oct 2007
Location: Montreal
Distribution: Slackware12;Slackware13
Posts: 106

Original Poster
Rep: Reputation: 15
Thanks guys,

They are really useful. I added my user to group ftp already with your help.


Ciao
 
  


Reply


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
add an existing user to an existing group? tramni1980 Slackware 5 05-08-2008 07:28 PM
howto add additional sas harddisk on existing RAID5 system taboo Linux - Newbie 2 10-24-2007 04:44 PM
Adding new group to existing user ALF Linux - Software 7 05-08-2006 09:35 PM
how to add an existing user to a new group? xpucto Linux - Newbie 8 04-19-2006 08:31 AM
add root user to the existing group ashley75 Linux - General 4 09-25-2003 09:40 PM


All times are GMT -5. The time now is 11:52 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