new_local_user_profile

Use the new_local_user_profile command to create an object for a local UNIX or Linux user in the currently selected zone. After you create the user object, it is automatically selected for editing with the set_local_user_profile_field command. That is, you do not need to execute the select_local_user_profile command to select the new user prior to defining profile fields. After you create the new user, save it by executing the save_local_user_profile command.

Note:Unlike local groups, which are visible by default, you must explicitly assign local users to a visible role. If you do not assign a local user to a visible role, the user profile defined in the zone object is not updated in /etc/passwd on local computers. A predefined visible role for local users, local listed, is provided to make local users visible. After you create a local user profile, you must assign the local user to the local listed role, or to another visible role. You can use the select_role_assignment and new_role_assignment ADEdit commands to make role assignments.

When the user profile is complete and the profileflag field is set to 1 (enabled) or 2 (disabled), the profile is added to /etc/passwd on each UNIX and Linux computer in the zone at the next local account refresh interval.

A user profile must have the following fields (attributes) to be considered complete:

  • A user name (the UNIX login name).
  • A unique numeric user identifier (UID).
  • The user’s primary group profile numeric identifier (GID).
  • The default home directory for the user.
  • The default login shell for the user.

Note that the GECOS field is not required.

See the Administrator’s Guide for Linux and UNIX for more details about creating local user profiles.

Zone Type

Hierarchical only.

Syntax

new_local_user_profile user_name

Abbreviation

newlup

Options

This command takes no options.

Arguments

This command takes the following argument:

Argument Type Description
user_name string Required. Specifies the UNIX name of the new local user to create in the zone.

Return Value

This command returns nothing if it runs successfully.

Examples

The following example shows a typical sequence of commands to create an object for the local UNIX or Linux user lam_usr4 in the currently selected zone. This command sequence creates a complete user profile, sets the profile flag to 1 (enabled), and adds the user to the local listed role so that the profile is added to /etc/passwd at the next local account update interval.

new_local_user_profile lam_usr4

set_local_user_profile_field uid 2004

set_local_user_profile_field gid 2004

set_local_user_profile_field shell /bin/bash

set_local_user_profile_field home /home/lam_usr4

set_local_user_profile_field profileflag 1

save_local_user_profile

select_role_assignment local listed

new_role_assignment lam_usr4

The following related ADEdit commands let you view and administer local UNIX and Linux users and groups that have profiles defined in the current zone:

  • delete_local_group_profile deletes a local UNIX or Linux group that has a profile defined in the current zone.
  • delete_local_user_profile deletes a local UNIX or Linux user that has a profile defined in the current zone.
  • get_local_group_profile_field displays the value of a profile field for the currently selected local UNIX or Linux group that has a profile defined in the current zone.
  • get_local_groups_profile displays a TCL list of profiles for local groups that are defined in the current zone.
  • get_local_user_profile_field displays the value of a profile field for the currently selected local UNIX or Linux user that has a profile defined in the current zone.
  • get_local_users_profile displays a TCL list of profiles for local users that are defined in the current zone.
  • list_local_groups_profile displays a list of local UNIX and Linux groups that have a profile defined in the current zone.
  • list_local_users_profile displays a list of local UNIX and Linux users that have a profile defined in the current zone.
  • new_local_group_profile creates an object for a local UNIX or Linux group in the currently selected zone.
  • save_local_group_profile saves the currently selected local UNIX or Linux group object after you create the group object or edit profile field values in the group object.
  • save_local_user_profile saves the currently selected local UNIX or Linux user object after you create the user object or edit profile field values in the user object.
  • select_local_group_profile selects a local UNIX or Linux group object for viewing or editing.
  • select_local_user_profile selects a local UNIX or Linux user object for viewing or editing.
  • set_local_group_profile_field sets the value of a field for the currently selected local UNIX or Linux group that has a profile defined in the current zone.
  • set_local_user_profile_field sets the value of a field for the currently selected local UNIX or Linux user that has a profile defined in the current zone.