| Date: Thu, 19 Oct 2006 12:33:31 +0100
| From: jm at jmason.org (Justin Mason)
|
| Pádraig Brady writes:
| > Does anyone know of existing systems that use numeric usernames?
| >
| > There is a proposal to change `chown 1234 file` in coreutils
| > to not look for a user name 1234 first, and just assume one means
| > the user id 1234. [ ... ]
|
| I can't think of one -- but the principle of least surprise would
| dictate at least *checking* getpwnam() first.
back when I was working on sys admin and security tools
for a Unix company a long long time ago in a place far
far away, this issue came up. the same idea (back then)
was driven by getpwnam(3) being slow.
I don't recall the arguments used against the idea then,
and the only rationale I can recall being used for the
idea was that getpwnam(3) was slow (esp., AFAICR, if the
NIS/YP/whatever server was inaccessible). hence, if my
memory is correct, the alternative which I _think_ was
ultimately implemented (cannot recall for certain now):
an option (`-n' or something, cannot recall now): if
`-n' was given, then the "name" had to be numeric (an
error otherwise), and was taken as the numeric UID.
also --- what I can recall more slightly clearly (since
I did or reviewed some of this work meself) --- is the
account creation tools (equivalent of useradd(8) &tc)
refused to create a numeric account. the tool which
checked the various files for consistency (`pwcheck' or
something, not sure if there is a Linux/GNU equivalent?)
whinged if it found a numeric username (or groupname).
however, the tools that modified an existing account
(e.g., passwd(1) &tc) were quite happy to work with
numeric usernames. hence, you had to "roll yer own"
to create such beasties, but if you had created them,
you were told this is a bad idea yet all the nominal
stuff still worked.
my memory is rather flakey here, and I'm not claiming
the above is 100% accurate, but that's how I recall the
same idea(/issue?) a universe away being dealt with.
this was all pre-POSIX, using K&R-1 C, which gives you
an idea just how long ago this was .... ;-\
cheers!
-blf-
--
Experienced (20+ yrs) kernel/software Eng: | Brian Foster Montpellier,
• Unix, embedded, &tc; • Linux; • doc; | blf at utvinternet.ie FRANCE
• IDL, automated testing, process, &tc. | Stop E$$o (ExxonMobile)!
Résumé (CV) http://www.blf.utvinternet.ie | http://www.stopesso.com
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!