From owner-freebsd-current@FreeBSD.ORG Wed Jun 16 09:14:07 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A34616A4CE; Wed, 16 Jun 2004 09:14:07 +0000 (GMT) Received: from mail.r.caley.org.uk (82-41-211-19.cable.ubr12.edin.blueyonder.co.uk [82.41.211.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B38943D41; Wed, 16 Jun 2004 09:14:06 +0000 (GMT) (envelope-from rjc@caley.org.uk) Received: from pele.r.caley.org.uk (pele.r.caley.org.uk [10.0.0.12]) by mail.r.caley.org.uk (8.12.6/8.12.6) with ESMTP id i5G9Co32020324; Wed, 16 Jun 2004 10:12:50 +0100 (BST) (envelope-from rjc@caley.org.uk) Received: from pele.r.caley.org.uk (localhost [127.0.0.1]) by pele.r.caley.org.uk (8.12.9/8.12.9) with ESMTP id i5G9CoFm059563; Wed, 16 Jun 2004 10:12:50 +0100 (BST) (envelope-from rjc@pele.r.caley.org.uk) Received: (from rjc@localhost) by pele.r.caley.org.uk (8.12.9/8.12.9/Submit) id i5G9CoDe059562; Wed, 16 Jun 2004 10:12:50 +0100 (BST) (envelope-from rjc) Date: Wed, 16 Jun 2004 10:12:50 +0100 (BST) Message-Id: <200406160912.i5G9CoDe059562@pele.r.caley.org.uk> From: Richard Caley To: freebsd-stable@freebsd.org, freebsd-current@freebsd.org X-Dragon: Errol Organisation: Interactive Information Ltd. X-Mailman-Approved-At: Wed, 16 Jun 2004 11:49:41 +0000 Subject: Bug in PW X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jun 2004 09:14:07 -0000 I thin this exists in both -STABLE and -CURRENT, but I don't have a bang up to date instalation of either, so appologies if it has been fixed. Tested on 5.2.1 and 4.8. may have some security implications in that someone may think they have changed a shell (eg to /nonexistant) but they haven't really. Apparently, supplying -d EXITING_HOME_DIR stops -s from setting the shell. # finger fred Login: fred Name: Fred Flintstone Directory: /home/fred Shell: /usr/local/bin/bash Never logged in. No Mail. No Plan. # pw usermod fred -s /bin/sh -d /home/fred # finger fred Login: fred Name: Fred Flintstone Directory: /home/fred Shell: /usr/local/bin/bash Never logged in. No Mail. No Plan. (ie no change) # pw usermod fred -s /bin/sh # finger fred Login: fred Name: Fred Flintstone Directory: /home/fred Shell: /bin/sh Never logged in. No Mail. No Plan. (now we have changed) # pw usermod fred -s /usr/local/bin/bash -d /home/fred2 pw: WARNING: home `/home/fred2' does not exist # finger fred Login: fred Name: Fred Flintstone Directory: /home/fred2 Shell: /usr/local/bin/bash Never logged in. No Mail. No Plan. (ie setting a different home allows the shell to change) Looks like an over-enthusiastic `if' in the code to me. -- rjc@interactive.co.uk _O_ |<