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: [MLUG] Simple command to add a user to a group?
- From: Mark Rages <EMAIL:PROTECTED>
- Date: Fri, 13 Jan 2006 23:16:51 -0600
- Delivery-date: Fri, 13 Jan 2006 23:17:46 -0600
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=dVJsyT4XY4GrEtWEQq/P+VmDgmfPqiwFfNR6qrkB51v0gSTQJekazBlB6FbhhRQQvmmT9Df2m4GRZDxmT4W7swqnoRV9Pm6sqi66Ua8tS+xNFMoT7zBQug7QJ+9qUnxBh9D4/J70oqBuiv3thFZ8S5F6IQkuNNanhxg4emTsD6c=
- Envelope-to: EMAIL:PROTECTED
- Reply-to: MLUG Members <EMAIL:PROTECTED>
- Sender: EMAIL:PROTECTED
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