Date: Wed, 20 Oct 1999 11:20:09 +0200 From: Sheldon Hearn <sheldonh@uunet.co.za> To: Drew Wiggins <drew@multinet-media.com> Cc: Martin Gignac <mgignac@cinar.com>, freebsd-questions@FreeBSD.ORG Subject: Re: How do I remove a user with a capital letter in the login ID? Message-ID: <22629.940411209@axl.noc.iafrica.com> In-Reply-To: Your message of "Mon, 18 Oct 1999 12:34:53 %2B0100." <380B05DD.1C09FECE@multinet-media.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 18 Oct 1999 12:34:53 +0100, Drew Wiggins wrote: > Use vipw and change the user login name. Or change the rmuser command, which is forcing a stupid restriction on you: Index: rmuser.perl =================================================================== RCS file: /home/ncvs/src/usr.sbin/adduser/rmuser.perl,v retrieving revision 1.8 diff -u -d -r1.8 rmuser.perl --- rmuser.perl 1999/08/28 01:15:11 1.8 +++ rmuser.perl 1999/10/20 09:19:36 @@ -108,7 +108,7 @@ # Username was given as a parameter $login_name = pop(@ARGV); die "Sorry, login name must contain alphanumeric characters only.\n" - if ($login_name !~ /^[a-z0-9_][a-z0-9_\-]*$/); + if ($login_name !~ /^\w[\w\-]*$/); } else { if ($affirm) { print STDERR "${whoami}: Error: -y option given without username!\n"; @@ -276,7 +276,7 @@ print "Enter login name for user to remove: "; $login_name = <>; chop $login_name; - if (!($login_name =~ /^[a-z0-9_][a-z0-9_\-]*$/)) { + if (!($login_name =~ /^\w[\w\-]*$/)) { print STDERR "Sorry, login name must contain alphanumeric characters only.\n"; } elsif (length($login_name) > 16 || length($login_name) == 0) { print STDERR "Sorry, login name must be 16 characters or less.\n"; Ciao, Sheldon. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?22629.940411209>