Thanks Mark, . . . that's the answer, and I did not know this.

James Chaplin
Systems Programmer, MVS, zVM & zLinux
Base Technologies, Inc
-----Original Message-----
From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of
Mark Post
Sent: Tuesday, October 06, 2009 2:33 PM
To: LINUX-390@VM.MARIST.EDU
Subject: Re: Remove a user from a secondary group

>>> On 10/6/2009 at 12:06 PM, "CHAPLIN, JAMES (CTR)"
<james.chap...@associates.dhs.gov> wrote: 
> I know how to add a user to a second group, for example to give su
> authority (using wheel)to a user, we issue the following command:
> usermod -G wheel testur4
> 
> But how can I remove him in a single command without directly editing
> the /etc/group & /etc/gshadow files (vigr). Is there a single command?

When you use "usermod -G group1,group2,group3 username", any groups that
username is a member of, but are not listed on the command, are removed.
I.e., each usermod -G command must specify _all_ the groups you want
them to be in.


Mark Post

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or
visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to