[sclug] Can't able to create user with DOTS?

James Beckett sclug at hackery.net
Tue Mar 1 21:04:22 UTC 2005


On Tue, 2005-03-01 at 18:34, Jonathan H N Chin wrote:
> James Beckett <sclug at hackery.net> wrote:
> > On Tue, 2005-03-01 at 15:38, Navneet wrote:
> > >    I can't able to create users having decimal point(s) in their name.
> > > i.e navneet.kc
> > > Notice: decimal point between navneet & kc.
> > 
> > That's right, you can't.
> 
> If he can't, it's not because it's not possible to do.

J'adoube: "Can't" for sensible values of "possible".

Depends whether the question means "I want to do this, should I,
can I, without breaking my system or re-engineering it into
something else" or "I want to do this, even if it's a hack and
I have to suffer future oddities."

> I just checked by creating "jhnc.wibble" by hand on debian,
> Solaris, HP-UX and IRIX: Works fine on all of them.

Now try chown'ing a file to that userid. And a group at the same
time. Now guarantee that all software you use on that machine
uses ":" instead of "." as a separator there.

I confess I spoke too hastily. POSIX 1003.2 does indeed allow for
a dot in usernames (up to the usual length limit) but until all
systems and software are fully POSIX compliant, it's inadvisable.
Something somewhere will undoubtedly not play nice.

> It's more likely that the tool being used to add the account
> has a "sanity check" that is disallowing it.

http://dictionary.reference.com/search?q=sanity%20check

  <programming> 1. Checking code (or anything else, e.g. a
  Usenet posting) for completely stupid mistakes.

I wasn't expecting quite such harsh condemnation from a dict
entry, but sanity checks are there for largely good reasons.
You take off the sanity checks, you take your chances.

> Breakage may be mostly benign (eg. truncated display in "ls"),
> but I wouldn't count on it.

The thing is, with "insane" things like this, that breakages,
benign or not, are often subtly hidden, and hard to track down
to a root cause. I've had plenty of cases in 20+ years of
software development of one sort or another where a thorny
problem has come down to some minor tweak or hack I did for
my own fun, convenience or stylistic choice, which wasn't
strictly "within the rules" but seemed outlandishly unlikely
to cause problems. Breakages also often occur in someone
/else/'s product where you have no a priori insight into how
they are doing things, and would require significant 
investment if you wish to tackle yourself.

> For example, sendmail converts localpart to lowercase before
> expanding aliases. (I actually make use of this to create accounts
> that mustn't receive email).

That sounds like a useful trick (er.. hack?) which I plan to
shamelessly steal.

And speaking of shameless, my admonitions above are barefacedly
hypocritical - I hack stuff out of shape all the time. But not
everyone needs to or should; if the original poster actually
is after a dotted email address, mucking with uids is probably
not the way to go :)

cheers,
jmb
-- 
James Beckett <jmb at hackery.net>
<www.hackery.net/jmb/>



More information about the Sclug mailing list