Long username and groupname support in libc
libc APIs have been enhanced to work with long (255 bytes)
user and group name. libc also supports new APIs that enable the application programmer
to get the current username attributes of the system.
The system administrator may use the newly provided lugadmin command to enable long user name. The lugadmin command will update a place holder file with the newly
set maximum username length. Once long username is set it cannot
be disabled.
In order to make application logic transparent to any future
expansion of username length, application programmers are encouraged
to use the sysconf API with the _SC_LOGIN_NAME_MAX parameter to dynamically determine the currently set username
length. The sysconf API will return the currently set username/groupname
length for the system.
Following libc APIs are long username and groupname enabled
A new API is provided in HP-UX 11i v3, ug_display_width, providing a mechanism for applications to check the
number of bytes of the username/groupname that is apt for displaying.
This display length can be set system wide using the lugadmin command or for a process or set of processes using the
environment variable UG_DISPLAY_WIDTH.
More information on enabling applications for long username
can be found in the white paper, “Username and groupname sizes
on HP-UX,” available at http://docs.hp.com and the manpage lugadmin.
Please refer to the respective manpages for more details.