ps and username size
Tito
farmatito at tiscali.it
Thu Jan 10 12:50:58 UTC 2008
On Thursday 10 January 2008 11:17:42 Cristian Ionescu-Idbohrn wrote:
> On Wed, 9 Jan 2008, Lombard, David N wrote:
>
> > Just to be sure, this doesn't guarantee unique output. An integer
> > string is a perfectly valid username, both on a full distro and
> > bb/uc (just tested both). It may be quite demented, but this is
> > legal in /etc/passwd:
> >
> > 42:...:100:100:user 42:/home/42:/bin/sh
> > frederick:...:42:100:some user:/home/frederick:/bin/sh
> >
> > So, when ps displays "42", which is it? Here's an example of the
> > proposed patch w/ ssh logins by "42" and "frederick"
>
> You have a point there.
>
> > Again, this is truly a corner case, and I'm quite happy to argue any
> > confusion is richly deserved...
>
> Maybe a new ps option to force UIDs only instead of truncated
> usernames would sort out the confusion. How does this sound?
>
>
> Cheers,
>
Isn't there a maximum lenght for usernames on unix/linux?
Would it make sense to set the width of this field to that value?
I ask this because on my system (Ubuntu 7.10 - more or less)
adduser fails with usernames longer than 32 chars.
Adding user `qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq' ...
Adding new group `qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq' (1006) ...
groupadd: qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq is not a valid group name
adduser: `/usr/sbin/groupadd -g 1006 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq' returned error code 3. Exiting.
Just an idea.
Ciao,
Tito
More information about the busybox
mailing list