Re: Removing secondary groups with usermod -G

2011-03-22 Thread Ted Unangst
perl doesn't actually edit the file in place, it just automates the tmp file handling. On Mar 22, 2011, at 1:10 AM, Bret Lambert wrote: > On Mon, Mar 21, 2011 at 9:45 PM, William Boshuck wrote: >> On Mon, Mar 21, 2011 at 01:18:41PM -0500, Chris Bennett wrote: >> >>> OpenBSD's form of sed requir

Re: Removing secondary groups with usermod -G

2011-03-22 Thread Steve Clarke
On Monday 21 Mar 2011 19:54:09 Stuart Henderson wrote: > On 2011-03-21, Steve Clarke wrote: > > I have read on the hindernet, that to remove a user from a group, > > you simply run usermod -G, and omit the group that you want the > > user to be removed from. These posts are often associated with

Re: Removing secondary groups with usermod -G

2011-03-22 Thread Paul de Weerd
On Tue, Mar 22, 2011 at 06:10:21AM +0100, Bret Lambert wrote: | On Mon, Mar 21, 2011 at 9:45 PM, William Boshuck wrote: | > On Mon, Mar 21, 2011 at 01:18:41PM -0500, Chris Bennett wrote: | > | >> OpenBSD's form of sed requires you to output to a new file and | >> mv that back to original. | > | >

Re: Removing secondary groups with usermod -G

2011-03-22 Thread Piotr Dacko
--- On Tue, 3/22/11, Bret Lambert wrote: > From: Bret Lambert > Subject: Re: Removing secondary groups with usermod -G > To: "William Boshuck" > Cc: misc@openbsd.org > Date: Tuesday, March 22, 2011, 7:10 AM > On Mon, Mar 21, 2011 at 9:45 PM, > William Boshuck &g

Re: Removing secondary groups with usermod -G

2011-03-21 Thread Bret Lambert
On Mon, Mar 21, 2011 at 9:45 PM, William Boshuck wrote: > On Mon, Mar 21, 2011 at 01:18:41PM -0500, Chris Bennett wrote: > >> OpenBSD's form of sed requires you to output to a new file and >> mv that back to original. > > .. or one could use ed, or perl, to change a file in place. What happens if

Re: Removing secondary groups with usermod -G

2011-03-21 Thread William Boshuck
On Mon, Mar 21, 2011 at 01:18:41PM -0500, Chris Bennett wrote: > OpenBSD's form of sed requires you to output to a new file and > mv that back to original. .. or one could use ed, or perl, to change a file in place. -wb

Re: Removing secondary groups with usermod -G

2011-03-21 Thread Kevin Chadwick
On Mon, 21 Mar 2011 13:18:41 -0500 Chris Bennett wrote: > OpenBSD's form of sed requires you to output to a new file and mv that back > to original. But that isn't a big deal. I'm fairly sure that that is what all seds do but just hide it from the user. Easier to use but raises questions about s

Re: Removing secondary groups with usermod -G

2011-03-21 Thread Stuart Henderson
On 2011-03-21, Steve Clarke wrote: > I have read on the hindernet, that to remove a user from a group, > you simply run usermod -G, and omit the group that you want the > user to be removed from. These posts are often associated with > HPUX and Solaris. > > The same does not work with OpenBSD, an

Re: Removing secondary groups with usermod -G

2011-03-21 Thread Chris Bennett
On Mon, Mar 21, 2011 at 05:50:37PM +, Steve Clarke wrote: > I have read on the hindernet, that to remove a user from a group, > you simply run usermod -G, and omit the group that you want the > user to be removed from. These posts are often associated with > HPUX and Solaris. > > The same do

Removing secondary groups with usermod -G

2011-03-21 Thread Steve Clarke
I have read on the hindernet, that to remove a user from a group, you simply run usermod -G, and omit the group that you want the user to be removed from. These posts are often associated with HPUX and Solaris. The same does not work with OpenBSD, and on looking into the code (user.c), it is cl