pw groupdel misbehavior?

Mars G. Miro marsgmiro at gmail.com
Thu Dec 8 02:59:15 PST 2005


Yo list!

  I just encountered something I think w/c is not right, e.g.:

root at jail:~# cat /etc/group
# $FreeBSD: src/etc/group,v 1.31 2004/06/23 01:32:28 mlaier Exp $
#
wheel:*:0:root,mars
daemon:*:1:
kmem:*:2:
sys:*:3:
tty:*:4:
operator:*:5:root
mail:*:6:
bin:*:7:
news:*:8:
man:*:9:
games:*:13:
staff:*:20:
sshd:*:22:
smmsp:*:25:
mailnull:*:26:
guest:*:31:
bind:*:53:
proxy:*:62:
authpf:*:63:
_pflogd:*:64:
uucp:*:66:
dialer:*:68:
network:*:69:
www:*:80:
nogroup:*:65533:
nobody:*:65534:
pgsql:*:70:

 root at jail:~# pw groupdel -g bleh
 root at jail:~# cat /etc/group
# $FreeBSD: src/etc/group,v 1.31 2004/06/23 01:32:28 mlaier Exp $
#
daemon:*:1:
kmem:*:2:
sys:*:3:
tty:*:4:
operator:*:5:root
mail:*:6:
bin:*:7:
news:*:8:
man:*:9:
games:*:13:
staff:*:20:
sshd:*:22:
smmsp:*:25:
mailnull:*:26:
guest:*:31:
bind:*:53:
proxy:*:62:
authpf:*:63:
_pflogd:*:64:
uucp:*:66:
dialer:*:68:
network:*:69:
www:*:80:
nogroup:*:65533:
nobody:*:65534:
pgsql:*:70:

 The previous action of deleting an invalid group (bleh) passed on to
-g via pw results in the 'wheel' group being deleted outright,
silently. Ouch.
 As an avid user of 'pw' I keep on inter-changing the -n and -g
switches (when working w/ pw user{add/mod/del} and pw
group{add/mod/del}), so it struck me when i realized I issued the
command above and the jail didnt know the 'wheel' group anymore when i
went on to do some other stuff (was installing ports when it didn't
know who's 'wheel', heh ;-)

 This happens on 5.4R and 6.0R, on my boxens.

 Thanks and FYI!


cheers
mars


More information about the freebsd-stable mailing list