Operating System - HP-UX
1843400 Members
3440 Online
110215 Solutions
New Discussion

Userid length restriction?

 
SOLVED
Go to solution
Michael Campbell
Trusted Contributor

Userid length restriction?

Does anyone know if there is a restriction on the length of usernames in HPUX11?

Rgds

Michael
3 REPLIES 3
Jeff Schussele
Honored Contributor
Solution

Re: Userid length restriction?

Hi Michael,

Absolute limit is 63 chars, BUT a lot of headaches can be avoided if usernames are kept <= 8 chars.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
PIYUSH D. PATEL
Honored Contributor

Re: Userid length restriction?

Hi,

Its better to keep it to 8 characters only. Maximum limit is 63 characters.

Piyush
PIYUSH D. PATEL
Honored Contributor

Re: Userid length restriction?

Hi,

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

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.

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

Piyush