[CLUG] Usernames

Vincent Cunniffe vincent at diva.ie
Wed Nov 13 15:04:28 GMT 2002


Donncha O Caoimh wrote:
> There is no standard but there are guidelines.
> 1. Don't have usernames which are more than 8 characters in length. I was told 
> by a Solaris admin ages ago that this'll confuse some tools, but I don't know 
> if this'll affect any GNU tools or others found on Linux these days.
> 2. Following from that, you can't have the first.lastname convention. We 
> implemented that by using aliases but for 800 users that'd be unworkable.

I tested this a bit, and some userspace tools don't like anything with 
more than 8 chars, or with a '.' in it. However, if they're already in 
the /etc/passwd file then most applications seem to be able to access 
them perfectly.

That said, there's no reason to use long format usernames on the OS 
level. Just allocate named in some short convention, such as 'beechera',
and then map to those using aliases.

The way I do it is to have a database of aliases, which can easily be 
edited and added to via a web form and a bit of PHP scripting. Every 
time sendmail restarts it calls a script to access the database and 
rebuild the alias, hostnames, and so forth. The aliases map all of the
'name.surname'/'surname.name'/'SurnameX', etc. formats to the local 
shortname.

> I think you need to look at something a lot more scalable than /etc/passwd for 
> 800 users of course and I'm positive there are ways around that.

I've had about 22k users in /etc/passwd without issues ;-)

Adding a new user is fun, because the toolset takes several seconds to 
verify that it doesn't match any existing one, but it runs fine otherwise.

Regards,

Vincent




More information about the Cork mailing list