From: Robert Wood Subject: Re: add an exixsting user to an existing group Date: Sat, 11 Dec 2004 09:45:18 +0000 Message-ID: <200412110945.18452.rob@rnwood.co.uk> References: <1102663787.9054.10.camel@Kaushal> <16825.49181.407026.91701@cerise.gclements.plus.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <16825.49181.407026.91701@cerise.gclements.plus.com> Content-Disposition: inline Sender: linux-admin-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii" To: Glynn Clements Cc: admin On Friday 10 Dec 2004 15:26, you wrote: > kaushal wrote: > > Is there a command to add an existing user to an existing group?This > > will be a supplementary group for the user.He still has his main group > > unchanged.I want a command instead of manually editing the /etc/group > > file. > > You can set the list of supplementary groups using usermod, e.g.: > > usermod -G group1,group2 user > > AFAIK, there isn't a standard command to add or remove specific groups > while leaving the rest unchanged. How about gpasswd? gpasswd (1) - administer the /etc/group file "gpasswd -a user group" adds user to a supp group, "-d" removes. Rob