Date: Wed, 16 Jun 2004 10:12:50 +0100 (BST) From: Richard Caley <rjc@interactive.co.uk> To: freebsd-stable@freebsd.org, freebsd-current@freebsd.org Subject: Bug in PW Message-ID: <200406160912.i5G9CoDe059562@pele.r.caley.org.uk>
next in thread | raw e-mail | index | archive | help
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_ |<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406160912.i5G9CoDe059562>