Subject: useradd: spaces and $ in usernames
To: None <tech-userlevel@netbsd.org>
From: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
List: tech-userlevel
Date: 11/16/2001 00:58:55
It's been brought to my attention that there might be desires to use
spaces and $s in login names[*], and I wonder if there's a really good
reason (besides the obvious ones :-) to not allow all but ':' in login
names? (If admins want it, give 'em the rope etc.)
The following patch works at least on 1.5.3_ALPHA, and I'd like to commit
it if there are no major objections:
Index: user.c
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/user/user.c,v
retrieving revision 1.45
diff -u -r1.45 user.c
--- user.c 2001/10/22 11:00:05 1.45
+++ user.c 2001/11/15 23:52:15
@@ -625,7 +625,7 @@
char *cp;
for (cp = login ; *cp ; cp++) {
- if (!isalnum(*cp) && *cp != '.' && *cp != '_' && *cp != '-') {
+ if (*cp == ':') {
return 0;
}
}
- Hubert
[*] e.g. when setting up samba as PDC you need login names that are like
" machine$ " - note the spaces.
--
Want to get a clue on IPv6 but don't know where to start? Try this:
* Basics -> http://www.onlamp.com/pub/a/onlamp/2001/05/24/ipv6_tutorial.html
* Setup -> http://www.onlamp.com/pub/a/onlamp/2001/06/01/ipv6_tutorial.html
Of course with your #1 IPv6 ready operating system -> http://www.NetBSD.org/