Subject: bin/21146: useradd --help
To: None <firstname.lastname@example.org>
From: Daniel Lamblin <email@example.com>
Date: 04/14/2003 04:09:37
>Synopsis: useradd has left the password file locked.
>Arrival-Date: Mon Apr 14 01:10:00 PDT 2003
>Originator: Daniel Lamblin
>Release: NetBSD 1.6
System: NetBSD tnt 1.6 NetBSD 1.6 (PM8500wACARD6260wMX98715AEC) #0: Mon Apr 14 00:10:10 EDT 2003 root@tnt:/usr/src/sys/arch/macppc/compile/PM8500wACARD6260wMX98715AEC macppc
I ran `useradd --help` which didn't work as I expected, but failed
in such a way as to leave my password file locked. It also left me
uncertain as to how to unlock it; it would be nice if it both didn't
do this, and made a helpful comment about proceeding on foot in case
I'm supposing I just find and delete the pw_lock file, but do I need
to worry about anything being in an inconsistant state?
root@tnt:~# adduser --help
bash: adduser: command not found
root@tnt:~# useradd --help
useradd: Warning: home directory `/home/--help' doesn't exist, and -m was not specified
usage: pwd_mkdb [-BLps] [-d directory] [-u user] file
useradd: pw_mkdb failed: No such file or directory
root@tnt:~# userdel --help
userdel: No such user `--help'
root@tnt:~# man useradd
root@tnt:~# useradd -m -s /usr/pkg/bin/bash friend
useradd: can't obtain pw_lock: File exists
vipw: the passwd file is busy.
root@tnt:~# echo sigh
Don't pass variables to programs without first checking if they will be
seen as flags. Also do more exit code checking, though maybe --help
exits with 0.