HPlogo HP-UX Reference > L

lugadmin(1M)

HP-UX 11i Version 2: December 2007 Update
» 

Technical documentation

 » Table of Contents

 » Index

NAME

lugadmin — long user and group name enablement and display

SYNOPSIS

lugadmin [-e] [-d num] [-l]

DESCRIPTION

The lugadmin command enables the support of long user and group names on the system, sets the default display width for long user and group names, and displays the current status of the system.

If no options are specified, the -l option is assumed.

Options

The following options are supported:

-e

Enable long user and group name support on the system. See the Enabling Long User and Group Names subsection below for details. This option requires superuser privileges.

-d num

Set num as the default display width for long user and group names. num can be in the range 0 to 31.

The -d option can be only be specified with the -e option or when long names have been previously enabled.

See the Setting the User and Group Name Display Width subsection below for details. This option requires superuser privileges.

-l

Display the current status of the system. The command displays one of:

8

The system is restricted to short (8-byte) user and group names.

31

The system is enabled for long (31-byte) user and group name support. A name string can be up to 31 bytes plus a trailing NULL byte.

Enabling Long User and Group Names

To enable long user and group names,

1.

Stop the pwgrd daemon.

# /sbin/init.d/pwgr stop

2.

Run the lugadmin command with the -e option.

# lugadmin -e [-d num]

3.

The command requests confirmation before enabling the system.

Long user/group name once enabled cannot be disabled in future. Do you want to continue [yY]:

If you respond with y or Y, the command proceeds; otherwise, it aborts.

4.

The command creates the /etc/default/lugname file.

5.

If the -d option is not specified, num defaults to 0. The specified or default value of num is written in lugname.

Setting the User and Group Name Display Width

The long user and group name default display width is set when lugadmin is executed with the -e option. It can be changed at any time by executing lugadmin with the -d option.

If -d is not specified with the -e option, the value of num defaults to 0.

The current display width is used by all system and conforming applications to display formatted output, as follows:

0

Display user and group names as you would for a short name system. If the name is longer than the command's default width, replace the last printable character of the name with a plus sign (+).

1 to 31

If the name is longer (in bytes) than the current display width, replace the last printable character of the name with a plus sign (+).

The above display format may change in future releases.

EXTERNAL INFLUENCES

Environment Variables

UG_DISPLAY_WIDTH

If it is set and long names are enabled, it overrides the width specified in the lugname file for all system and conforming applications that write formatted output.

RETURN VALUE

lugadmin exits with one of the following values:

0

Successful completion

-1

Failure

DIAGNOSTICS

Note: System is already enabled for long user/group name

  • You may have attempted to use the -e option for a second time.

    Error: The system is not enabled for long user/group name

  • You tried to use the -d option before using the -e option.

    Error: Can't create file /etc/defaults/lugname

    Error: Can't open file /etc/defaults/lugname

    Error: The pwgrd daemon must be killed before enabling the system. The daemon can be restarted once the system is enabled

    system() failed

  • A call to the system() function failed.

    Error: Long user/group name feature is not supported on trusted systems

WARNINGS

The lugname file is the switch that marks a long name system. If it is missing, short names are assumed and the UG_DISPLAY_WIDTH variable is ignored.

While many programs are unaffected by long names in a short name environment, some may behave abnormally and some may abort.

It is recommended that you do not attempt to restore the short name environment once long names have been enabled.

Do not use the system constant LOGIN_NAME_MAX with the getconf command or the sysconf() function to test for name length; it is not changed when long names are enabled.

The value of the current status of the system (-l option) may change in future releases.

Once a system is enabled for long user and group names, it cannot be made a trusted system.

AUTHOR

lugadmin was developed by HP.

FILES

/etc/default/lugname

If this file is present, the system is enabled for long user and group names; otherwise, it is not. This file contains the default display width, as set with the -d option.