HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
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
Honored Contributor

Re: Userid length on HP-UX

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

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.


Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
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.

* 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


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

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....

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


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.

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