h...@stare.cz (Jan Stary), 2010.12.13 (Mon) 09:15 (CET): > On Dec 13 12:01:58, OpenBSD Geek wrote: > > 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 ? > Sadly, no. These users will be members of these groups forever. > There's nothing you can do about it. You can only reinstall.
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''.