From owner-freebsd-stable@FreeBSD.ORG Thu Dec 8 10:59:15 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AD0216A41F for ; Thu, 8 Dec 2005 10:59:15 +0000 (GMT) (envelope-from marsgmiro@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5CB343D75 for ; Thu, 8 Dec 2005 10:58:49 +0000 (GMT) (envelope-from marsgmiro@gmail.com) Received: by zproxy.gmail.com with SMTP id 8so596859nzo for ; Thu, 08 Dec 2005 02:58:21 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Ac9YlT8+C9jSONoWMiN30pm01WmriWxu5NvuzRxlHuX4UgzIsMh1m1n3ZgTwVTlZlm2QgW9ChWBWd26tmlX5+p7CgoOmVUpphq7UvCj1NydmS0Aoz5ClwqFzwb6p8SuIBkGOxNzX2GAaEqSqQ/KB8uO4YPaUXe1t8AF42UUCWbE= Received: by 10.36.77.3 with SMTP id z3mr2503312nza; Thu, 08 Dec 2005 02:58:21 -0800 (PST) Received: by 10.36.71.10 with HTTP; Thu, 8 Dec 2005 02:58:20 -0800 (PST) Message-ID: <28edec3c0512080258u381182bfia5fca6193c57bb6@mail.gmail.com> Date: Thu, 8 Dec 2005 18:58:20 +0800 From: "Mars G. Miro" To: freebsd-stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: pw groupdel misbehavior? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2005 10:59:15 -0000 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