remove users from group

Previous thread: Última Presentación: Taller de Finanzas para NO Financieros, México D.F. by LIc. Maria Robledo on Sunday, December 12, 2010 - 11:49 pm. (1 message)

Next thread: Re: easy snapshot updates by Ed Ahlsen-Girard on Monday, December 13, 2010 - 6:40 am. (2 messages)
From: OpenBSD Geek
Date: Monday, December 13, 2010 - 1:01 am

Hi,

I have 100 users in groups : clients, and ftp_group
How can i remove these 100 users from ftp_group ?
I have already try usermod, but it only add users to group, not remove.
Is there a way to achieve my task ?
Thanks

From: Jan Stary
Date: Monday, December 13, 2010 - 1:15 am

Sadly, no. These users will be members of these groups forever.
There's nothing you can do about it. You can only reinstall.

From: Rob Pickering
Date: Monday, December 13, 2010 - 1:30 am

*what*

vi /etc/group

--
     Rob.

From: patric conant
Date: Monday, December 13, 2010 - 1:36 am

You may also try copying over a valid groups file from a different machine.


From: MERIGHI Marcus
Date: Monday, December 13, 2010 - 2:14 am

And do not forget to wipe your hard disk to make sure you have a clean
re-install!

Jan, you just brightened my monday morning, thanks!

On the more serious side and for the OP: how about the unix way of
combining simple tools to accomplish more complex tasks:
1) use id(1) to get the groups
2a) use sed(1) to get rid of the unwanted ones
2b) use tr(1) to get a newline seperated list and grep(1) to get rid of
    the unwanted groups.
3) use tr(1) again to transform the new list to a format suitable for
   usermod(8).
4) feed ``usermod -G'' the new list.

OR just ``vi /etc/groups''.

From: Bret Lambert
Date: Monday, December 13, 2010 - 2:23 am

On Mon, Dec 13, 2010 at 10:14 AM, MERIGHI Marcus <mcmer-openbsd@tor.at>

You're all wrong. We obviously need XML user databases.

From: Francesco Vollero
Date: Monday, December 13, 2010 - 2:46 am

XML? Are you talking about the best system to create database on file 
not human readable? :) But talking about user databases, would not be 
better JSON or BSON ? geez!
Anyway to answer the question, /there's more than one way to/ accomplish 
this task. And..it's the key to solve the problem.

From: Henning Brauer
Date: Friday, December 24, 2010 - 1:56 pm

go play with phk, only JSON is web scale.

-- 
Henning Brauer, hb@bsws.de, henning@openbsd.org
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting

From: Bret Lambert
Date: Saturday, December 25, 2010 - 12:59 pm

From: Miod Vallat
Date: Saturday, December 25, 2010 - 1:13 pm

Over ASN.1, of course.

Previous thread: Última Presentación: Taller de Finanzas para NO Financieros, México D.F. by LIc. Maria Robledo on Sunday, December 12, 2010 - 11:49 pm. (1 message)

Next thread: Re: easy snapshot updates by Ed Ahlsen-Girard on Monday, December 13, 2010 - 6:40 am. (2 messages)