FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 03-27-2010, 04:12 PM
Jochen Schmitt
 
Default Maximum length of userid on Fedora Linux

Hallo,

I want to ask which is the maximum length of a userid on Fedora Linux.

I think the maximum length of a userid should be 16 but I want to get
a confiration about this assumetion.

Best Regards:

Jochen Schmitt
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-27-2010, 04:17 PM
Conrad Meyer
 
Default Maximum length of userid on Fedora Linux

On Saturday 27 March 2010 10:12:32 am Jochen Schmitt wrote:
> Hallo,
>
> I want to ask which is the maximum length of a userid on Fedora Linux.
>
> I think the maximum length of a userid should be 16 but I want to get
> a confiration about this assumetion.


$ sudo useradd a23456789012345678901234567890
$ ls /home/a23456789012345678901234567890/
ls: cannot open directory /home/a23456789012345678901234567890/: Permission
denied

I think there isn't a 16 char limit .

Regards,
--
Conrad Meyer <cemeyer@u.washington.edu>
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-27-2010, 08:02 PM
Miloslav Trmač
 
Default Maximum length of userid on Fedora Linux

Jochen Schmitt p*še v So 27. 03. 2010 v 18:12 +0100:
> I want to ask which is the maximum length of a userid on Fedora Linux.
(UT_NAMESIZE - 1). UT_NAMESIZE is defined in <utmp.h>

> I think the maximum length of a userid should be 16 but I want to get
> a confiration about this assumetion.
What's special about "16"? Why not 8, 15, 17, 24, 32?
Mirek

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-28-2010, 09:38 AM
Jochen Schmitt
 
Default Maximum length of userid on Fedora Linux

Am 27.03.2010 22:02, schrieb Miloslav Trmač:
> What's special about "16"? Why not 8, 15, 17, 24, 32?
> Mirek
>
>
A user has reported a crash about blender on bugzilla.

The examination of the bug shows, that there is a assignement where
a userid was copied into a array which is decleared as char [16], so
I though to memorize that I have read sometihing about 16 character
as a maximum for a userid on Unix.

Best Regards:

Jochen Schmitt
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-28-2010, 12:49 PM
Miloslav Trmač
 
Default Maximum length of userid on Fedora Linux

Jochen Schmitt p*še v Ne 28. 03. 2010 v 11:38 +0200:
> Am 27.03.2010 22:02, schrieb Miloslav Trmač:
> > What's special about "16"? Why not 8, 15, 17, 24, 32?
> A user has reported a crash about blender on bugzilla.
>
> The examination of the bug shows, that there is a assignement where
> a userid was copied into a array which is decleared as char [16], so
> I though to memorize that I have read sometihing about 16 character
> as a maximum for a userid on Unix.
Oh. In that case, use LOGIN_NAME_MAX from <limits.h> (256 on my
system).
Mirek

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-28-2010, 01:09 PM
drago01
 
Default Maximum length of userid on Fedora Linux

2010/3/28 Miloslav Trmač <mitr@volny.cz>:
> Jochen Schmitt p*še v Ne 28. 03. 2010 v 11:38 +0200:
>> Am 27.03.2010 22:02, schrieb Miloslav Trmač:
>> > What's special about "16"? *Why not 8, 15, 17, 24, 32?
>> A user has reported a crash about blender on bugzilla.
>>
>> The examination of the bug shows, that there is a assignement where
>> a userid was copied into a array which is decleared as char [16], so
>> I though to memorize that I have read sometihing about 16 character
>> as a maximum for a userid on Unix.
> Oh. *In that case, use LOGIN_NAME_MAX from <limits.h> (256 on my
> system).

Or sysconf(_SC_LOGIN_NAME_MAX) to get the correct value at runtime for
the system you are running on.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-29-2010, 09:09 AM
"Richard W.M. Jones"
 
Default Maximum length of userid on Fedora Linux

On Sat, Mar 27, 2010 at 06:12:32PM +0100, Jochen Schmitt wrote:
> I want to ask which is the maximum length of a userid on Fedora Linux.
>
> I think the maximum length of a userid should be 16 but I want to get
> a confiration about this assumetion.

Even old Red Hat Linux supported long account names (I assume you mean
the 'account' field, not the 'UID'). I tested RHL 6? 7? back in 2000
and it handled account names up to around 255 characters. This was
for a project called OfficeMaster, a kind of web-based office suite.
Plus ca change, plus c'est la meme chose.

The real issue, as I recall, was support for these long names in
various userspace utilities that might store or transmit account
names.

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-30-2010, 06:51 PM
Kevin Kofler
 
Default Maximum length of userid on Fedora Linux

Miloslav Trmač wrote:
> Oh. In that case, use LOGIN_NAME_MAX from <limits.h> (256 on my
> system).

Does that include the terminating '' or should the buffer actually be
sized LOGIN_NAME_MAX+1?

Kevin Kofler

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-30-2010, 07:04 PM
Miloslav Trmač
 
Default Maximum length of userid on Fedora Linux

Kevin Kofler p*še v Út 30. 03. 2010 v 20:51 +0200:
> Miloslav Trmač wrote:
> > Oh. In that case, use LOGIN_NAME_MAX from <limits.h> (256 on my
> > system).
>
> Does that include the terminating '' or should the buffer actually be
> sized LOGIN_NAME_MAX+1?
It doesn't really matter, the practical limit is so much smaller.

(man limits.h) doesn't say, but _POSIX_LOGIN_NAME_MAX does include the
terminating '', so LOGIN_NAME_MAX probably does as well.
Mirek

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 11:29 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org