NetBSD-Docs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

delete user from group (was Re: NetBSD reference card (again!))

On Tue, 12 Aug 2014, Ilia Zykov wrote:

> Maybe anybody knows how to remove an user from a secondary(additional)
> group without
> manual edits the /etc/group. For instance:
> FreeBSD 'pw groupmod group -d user'

The user(8) tool doesn't offer it, but its code does have 
rm_user_from_groups function for removing from all groups. Maybe you can 
reuse or extend that code to have routine to only remove from defined 

By the way, the usermod/groupmod tool(s) on Linux (I looked at Ubuntu 
passwd 1: package) also doesn't have this 
feature, but the usermod -G does remove the user from any groups not 
listed with the -G.

Home | Main Index | Thread Index | Old Index