cancel
Showing results for 
Search instead for 
Did you mean: 

Userid length on HP-UX

Andy Cooper_1
Occasional Visitor

Userid length on HP-UX

Sorry to be a complete wuss, but I'm an HP novice. Can anyone tell me if the maximum userid length on Version 11 is 8 characters?

Andy Cooper
8 REPLIES
Victor BERRIDGE
Honored Contributor

Re: Userid length on HP-UX

Hi,
I suppose a general consensus here would be to stick to a maximum of 8 char for compatibility purpose between open systems...

All the best

Victor
Dan Hetzel
Honored Contributor

Re: Userid length on HP-UX

Hi Andy,

Victor is right. Although it's not written anywhere, the general consensus is to limit to 8 chars for compatibility reasons.

Cheers,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Rainer_1
Honored Contributor

Re: Userid length on HP-UX

found some information in /usr/include/limits.h

/*
* The size of the storage required for a login name, in bytes,
* including the terminating null.
*/
# define _POSIX_LOGIN_NAME_MAX 9

/*
* Maximum Length of a login name.
*/
# define LOGIN_NAME_MAX 64

So general 8 chars is the maximum but HP-UX will recognize up to 63 chars.
James R. Ferguson
Acclaimed Contributor

Re: Userid length on HP-UX

Andy:

The user login name's length is limited to 8-bytes. Look at /usr/include/utmp.h or the man pages for 'utmp (4)'.

...JRF...
CHRIS ANORUO
Honored Contributor

Re: Userid length on HP-UX

To add to Victor's contribution, SAM limits the number of characters to 8 which also conforms to general unix logname specifications and restrictions.
Check the online manual on passwd. (man 4 passwd)
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Motorola GTSS-West
Occasional Visitor

Re: Userid length on HP-UX

Ok, so i now use ldap as my login authentication system. I have a login that is 10 characters long. I can login to the machine (thank you pam_ldap...) but when my shell comes up, my login is truncated to 8 chars. when i try to rlogin to somewhere else from there, it uses the short userid (which doesnt exist)... Sigh... Oh and just for fodder, the Solaris and Linux boxes dont have this trouble....

-darryl
Dave Johnson_1
Super Advisor

Re: Userid length on HP-UX

I just got this from "man 4 passwd":
The following fields have size limitations as noted:
+ Login name field can be no longer than 8 characters;
Steven E. Protter
Exalted Contributor

Re: Userid length on HP-UX

Shalom,

8 characters is the limit. 11.31 and 11.23 permit longer, but that introduces issues you would rather not deal with, including interoperability issues with 11.11 systems and other Unix systems.

Best to live within the 8 character limit.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com