LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
 
LinkBack Search this Thread
Old 05-11-2008, 12:18 AM   #1
asadrony
LQ Newbie
 
Registered: May 2008
Posts: 8

Rep: Reputation: 0
Create a Group under an existing Group


Hi, I want to create a fresh group under an existing group, is it possible. How to.............Thanks.
 
Old 05-11-2008, 12:40 AM   #2
dudeman41465
Member
 
Registered: Jun 2005
Location: Kentucky
Distribution: Ubuntu
Posts: 794

Rep: Reputation: 56
As in you want to create a group that inherits rights from another group above it, but also has its own set of specified rules? Sorry to answer a question with a question but I'm just kind of clarifying so I know what I'm looking for.
 
Old 05-11-2008, 12:43 AM   #3
fbianconi
Member
 
Registered: Apr 2008
Location: argentina
Distribution: Arch
Posts: 86

Rep: Reputation: 22
I don't understand the question, perhaps you're trying to make another group that has same user that are already on other group?
If that so, there isn't any group inheritance (that I'm aware of) so what I would do is to make a new group and add members to it, since a user can have many groups besides it's initial group

as root:
Code:
groupadd newgroup
usermod -a -G newgroup someuser
usermod -a -G newgroup someotheruser
changing users an groups names as needed

Last edited by fbianconi; 05-11-2008 at 12:44 AM.
 
Old 05-11-2008, 01:53 AM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
If the suid bit is set on a directory in Linux, if you create a file in that directory, the owning group of the file will be inherited fron the owning group of the directory. The default group of the writer will be lost however. You might want to look at the setfacl and getfacl programs. You can add permissions for several groups or owners.

setfacl -m user:jim:r filename
setfacl -m user:jane:rw filename
setfacl -m group:netgroup:rw filename
setfacl -m group:labgroup:r filename

You can shorten user to u, group to g and string -m entries:
setfacl -m u:jim:r -m u:jane:rw -m g:netgroup:rw -m g:labgroup:r filename
 
Old 05-11-2008, 10:50 PM   #5
asadrony
LQ Newbie
 
Registered: May 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks...therefore, I want to say, there is already existing a group "Mkt" (Marketing), now I want to add a new group "sales" into "mkt" group. Is possible...........thanks
 
Old 05-12-2008, 08:06 PM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Groups don't have group members. There are no subgroups.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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
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
group: add complete group into other group max_mad Suse/Novell 1 04-12-2006 01:43 AM
Group Admin, Group Root, or God over Group crickett Linux - General 5 07-12-2004 04:01 PM


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