group security

This is a discussion on group security within the Linux Security forums, part of the System Security and Security Related category; I am new. And this is likely to be a very well understood topic, but its new to me. So, ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-22-2005
MLH
 
Posts: n/a
Default group security

I am new. And this is likely to be a
very well understood topic, but its
new to me. So, here goes...

I'm just now becoming aware that if a user (myuser)
is a member of 2 or more groups and I want to add
them to another group - the usermod command will
allow me to do it.

IE, myuser is member of group1 and group2 already.
group1 is his PRIMARY group. I want to add him to
group3 so he'll be a member of all 3 groups. Here's
what I do...

usermod -G group2,group3 myuser

Is there another command I can use that just adds
him to the additional group3 without my having to
put in group2 (which he has already been a member
of for some time)?
Reply With Quote
  #2 (permalink)  
Old 03-22-2005
JD
 
Posts: n/a
Default Re: group security

MLH wrote:
> I am new. And this is likely to be a
> very well understood topic, but its
> new to me. So, here goes...
>
> I'm just now becoming aware that if a user (myuser)
> is a member of 2 or more groups and I want to add
> them to another group - the usermod command will
> allow me to do it.
>
> IE, myuser is member of group1 and group2 already.
> group1 is his PRIMARY group. I want to add him to
> group3 so he'll be a member of all 3 groups. Here's
> what I do...
>
> usermod -G group2,group3 myuser
>
> Is there another command I can use that just adds
> him to the additional group3 without my having to
> put in group2 (which he has already been a member
> of for some time)?


yea just edit the group file
Reply With Quote
  #3 (permalink)  
Old 03-22-2005
MLH
 
Posts: n/a
Default Re: group security

OK. Thx.
>
>yea just edit the group file


Reply With Quote
  #4 (permalink)  
Old 03-22-2005
Hrvoje Spoljar
 
Posts: n/a
Default Re: group security

JD <No@Reply.com> pise na comp.os.linux.security:
[CUT]
>> Is there another command I can use that just adds
>> him to the additional group3 without my having to
>> put in group2 (which he has already been a member
>> of for some time)?

>
> yea just edit the group file


for edit use vigr (it handles file locking in safe manor)

and check if your distribution has adduser because adduser
supports

$adduser user group

and reverse with deluser

$deluser user group

to remove user from single group



--
____ __ ___| | ___ Ignorance is .~. hrvoje.spoljar@><.pbf.hr
(_-< '_ \/ _ \ |_/ -_) bliss, but / V \ irc # RoCkY
/__/ .__/\___/__/\___| knowledge is /( )\ icq : 53000945
|_| power! ^-^
Reply With Quote
  #5 (permalink)  
Old 03-23-2005
Wayne
 
Posts: n/a
Default Re: group security

MLH wrote:
> I am new. And this is likely to be a
> very well understood topic, but its
> new to me. So, here goes...
>
> I'm just now becoming aware that if a user (myuser)
> is a member of 2 or more groups and I want to add
> them to another group - the usermod command will
> allow me to do it.
>
> IE, myuser is member of group1 and group2 already.
> group1 is his PRIMARY group. I want to add him to
> group3 so he'll be a member of all 3 groups. Here's
> what I do...
>
> usermod -G group2,group3 myuser
>
> Is there another command I can use that just adds
> him to the additional group3 without my having to
> put in group2 (which he has already been a member
> of for some time)?


Try the gpasswd command:

gpasswd -a myuser group3

I have never understood why groupmod command doesn't
have more functionality, such as this. But gpasswd is
a very convienent tool for working with groups.

If you use "vi", you can do that more safely with "vigr"
command. When done use "grpck" command to check your
changes didn't corrupt anything.

-Wayne
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 03:07 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0