Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
- To: "MLUG Members" <EMAIL:PROTECTED>
- Subject: RE: [MLUG] Simple command to add a user to a group?
- From: "Pepper, Mike" <EMAIL:PROTECTED>
- Date: Fri, 13 Jan 2006 23:23:08 -0600
- Delivery-date: Fri, 13 Jan 2006 23:23:55 -0600
- Envelope-to: EMAIL:PROTECTED
- Reply-to: MLUG Members <EMAIL:PROTECTED>
- Sender: EMAIL:PROTECTED
- Thread-index: AcYYyc1LBNS4yi6rQ7esSn/9yUfODQAAI9LQ
- Thread-topic: [MLUG] Simple command to add a user to a group?
I know that it is a simple affair in SuSE's YAST, but I don't know the
command line verbage, and I don't know about other distros.
Mike
-----Original Message-----
From: EMAIL:PROTECTED
[mailto:EMAIL:PROTECTED] On Behalf Of Mark Rages
Sent: Friday, January 13, 2006 11:17 PM
To: MLUG Members
Subject: [MLUG] Simple command to add a user to a group?
Here's a message I wrote to a specialty mailing list.
Does anyone in MLUG know a simple way to add a user to a group, while
leaving the user in the groups he already belongs to?
Regards,
Mark
EMAIL:PROTECTED
---------- Forwarded message ----------
From: Mark Rages <EMAIL:PROTECTED>
Date: Jan 13, 2006 11:13 PM
Subject: Re: pyk hotplug scripts and usermod
To: EMAIL:PROTECTED
On 1/13/06, Xiaofan Chen <EMAIL:PROTECTED> wrote:
>
> I was using Mark's hotplug script from pyk-0.3.1 so that I can run
> pk2 and pyk as a normal user under Linux. Then I need to
> create a group named pickit and add myself to the pickit group.
>
> So I followed the prompt and issued the cpmmand
> "usermod -G pickit mcuee" which kicks me out of all the groups
> I am in. Other than manually doing "usermod -G pickit,admin,
> audio,someothergroups mcuee", what can I do?
>
> Of course I can use the GUI to do this. But I am a bit interested
> to know how to do this using bash.
>
I would also like to know if there is a simple command to do this.
You can use 'groups' or 'id -Gn' to list the groups you are in.
So I can add 'markrages' to the 'pickit' group like this:
# usermod -G pickit,`id -Gn markrages | tr ' ' ,` markrages
The tr ' ' , is to replace spaces with commas.
But that is a hackish way to do it. Such a common task should have a
simple command. I will ask my Linux User Group about this.
Regards,
Mark
EMAIL:PROTECTED
--
You think that it is a secret, but it never has been one.
- fortune cookie
_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members
_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members