Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Dec 2005 18:58:20 +0800
From:      "Mars G. Miro" <marsgmiro@gmail.com>
To:        freebsd-stable@freebsd.org
Subject:   pw groupdel misbehavior?
Message-ID:  <28edec3c0512080258u381182bfia5fca6193c57bb6@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Yo list!

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

root@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@jail:~# pw groupdel -g bleh
 root@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?28edec3c0512080258u381182bfia5fca6193c57bb6>