[plug] re: User names
Matt Kemner
zombie at networx.net.au
Wed Jul 28 08:41:00 WST 1999
On Tue, 27 Jul 1999, Jon L. Miller wrote:
> Yeah, this is what I've done, I was just wondering if there is a rule
> that states do not use "." in creating user names.
It's not recommended.
Even though you could probably get it to work on your system and not see
any side-effects, chances are down the track you will install some utility
(or write a script) that doesn't expect to see a . in a username.
A good example is the chown command, where you can set the userid and
groupid of a file at the same time by seperating them by a .
eg. "chown root.admin /etc/*" which sets the ownership of all files in
/etc/ to root, and group of admin.
Other symbols can cause other problems. The only characters I allow for
usernames are a-z 0-9 "_" and "-".
I modified adduser so it contains:
my $validchars="[a-z0-9_-]";
if ($user !~ /^$validchars+$/) {
print "Invalid character in username\n";
exit;
}
So nobody can make the mistake.
If people want email addresses with symbols in them, I add an alias for
them in /etc/aliases, as was suggested in several earlier posts.
- Matt
More information about the plug
mailing list