Managing User Accounts and User Environments in Oracle Solaris 11.4
Managing User Accounts and User Environments in Oracle Solaris 11.4
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Access to Oracle Support
Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?
ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.
Diversity and Inclusion
Oracle is fully committed to diversity and inclusion. Oracle recognizes the influence of ethnic and cultural values and is working to remove language from our products and
documentation that might be considered insensitive. While doing so, we are also mindful of the necessity to maintain compatibility with our customers' existing technologies and the
need to ensure continuity of service as Oracle's offerings and industry standards evolve. Because of these technical constraints, our effort to remove insensitive terms is an ongoing,
long-term process.
Référence: E60996
Copyright © 1998, 2021, Oracle et/ou ses affiliés.
Ce logiciel et la documentation qui l'accompagne sont protégés par les lois sur la propriété intellectuelle. Ils sont concédés sous licence et soumis à des restrictions d'utilisation et
de divulgation. Sauf stipulation expresse de votre contrat de licence ou de la loi, vous ne pouvez pas copier, reproduire, traduire, diffuser, modifier, accorder de licence, transmettre,
distribuer, exposer, exécuter, publier ou afficher le logiciel, même partiellement, sous quelque forme et par quelque procédé que ce soit. Par ailleurs, il est interdit de procéder à toute
ingénierie inverse du logiciel, de le désassembler ou de le décompiler, excepté à des fins d'interopérabilité avec des logiciels tiers ou tel que prescrit par la loi.
Les informations fournies dans ce document sont susceptibles de modification sans préavis. Par ailleurs, Oracle Corporation ne garantit pas qu'elles soient exemptes d'erreurs et vous
invite, le cas échéant, à lui en faire part par écrit.
Si ce logiciel, ou la documentation qui l'accompagne, est livré sous licence au Gouvernement des Etats-Unis, ou à quiconque qui aurait souscrit la licence de ce logiciel pour le
compte du Gouvernement des Etats-Unis, la notice suivante s'applique :
U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware,
and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer
software" or "commercial computer software documentation" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the
use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system,
integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other
Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract. The terms governing the U.S. Government's use of Oracle cloud
services are defined by the applicable contract for such services. No other rights are granted to the U.S. Government.
Ce logiciel ou matériel a été développé pour un usage général dans le cadre d'applications de gestion des informations. Ce logiciel ou matériel n'est pas conçu ni n'est destiné à
être utilisé dans des applications à risque, notamment dans des applications pouvant causer un risque de dommages corporels. Si vous utilisez ce logiciel ou matériel dans le cadre
d'applications dangereuses, il est de votre responsabilité de prendre toutes les mesures de secours, de sauvegarde, de redondance et autres mesures nécessaires à son utilisation dans
des conditions optimales de sécurité. Oracle Corporation et ses affiliés déclinent toute responsabilité quant aux dommages causés par l'utilisation de ce logiciel ou matériel pour des
applications dangereuses.
Oracle et Java sont des marques déposées d'Oracle Corporation et/ou de ses affiliés. Tout autre nom mentionné peut correspondre à des marques appartenant à d'autres propriétaires
qu'Oracle.
Intel et Intel Inside sont des marques ou des marques déposées d'Intel Corporation. Toutes les marques SPARC sont utilisées sous licence et sont des marques ou des marques
déposées de SPARC International, Inc. AMD, Epyc, et le logo AMD sont des marques ou des marques déposées d'Advanced Micro Devices. UNIX est une marque déposée de The
Open Group.
Ce logiciel ou matériel et la documentation qui l'accompagne peuvent fournir des informations ou des liens donnant accès à des contenus, des produits et des services émanant de
tiers. Oracle Corporation et ses affiliés déclinent toute responsabilité ou garantie expresse quant aux contenus, produits ou services émanant de tiers, sauf mention contraire stipulée
dans un contrat entre vous et Oracle. En aucun cas, Oracle Corporation et ses affiliés ne sauraient être tenus pour responsables des pertes subies, des coûts occasionnés ou des
dommages causés par l'accès à des contenus, produits ou services tiers, ou à leur utilisation, sauf mention contraire stipulée dans un contrat entre vous et Oracle.
Accessibilité de la documentation
Pour plus d'informations sur l'engagement d'Oracle pour l'accessibilité de la documentation, visitez le site Web Oracle Accessibility Program, à l'adresse : http://www.oracle.com/
pls/topic/lookup?ctx=acc&id=docacc.
Accès aux services de support Oracle
Les clients Oracle qui ont souscrit un contrat de support ont accès au support électronique via My Oracle Support. Pour plus d'informations, visitez le site http://www.oracle.com/
pls/topic/lookup?ctx=acc&id=info ou le site http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs si vous êtes malentendant.
Contents
5
Contents
Index .................................................................................................................. 43
6 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
Using This Documentation
■ Overview – Describes how to manage user accounts and user environments in Oracle
Solaris 11.4.
■ Audience – System administrators using the Oracle Solaris 11.4 release.
■ Required knowledge – Experience administering UNIX systems.
Feedback
Provide feedback about this documentation at http://www.oracle.com/goto/docfeedback.
For task-related information about managing user accounts and user environments, see
Chapter 2, “Managing User Accounts by Using the Command-Line Interface”.
A role is a special type of user account that grants special rights to specific users. For more
information, see Chapter 1, “About Using Rights to Control Users and Processes” in Securing
Users and Processes in Oracle Solaris 11.4.
All security policy configurations for user account attributes are provided by the SMF service
account-policy. In previous Oracle Solaris releases, these were defined in individual
configuration files such as /etc/default/login or /etc/security/policy.conf. For
information about configuring security policies through the account-policy SMF service,
see “Modifying Rights System-Wide As SMF Properties” in Securing Users and Processes in
Oracle Solaris 11.4 as well as the account-policy(8S) man page.
User Names
Users access local or remote systems through their user or login names. The extent of access
depends on the user's rights.
Before you create accounts, plan on a standard way of assigning user names that facilitates
tracking them and associating them with actual persons. With the standard as foundation, you
only need to make slight adjustments for contingencies. For example, if your standard is based
on users' first initials and surnames, you can easily adjust if two users share the same first initial
and last names.
User ID Numbers
Each user name is associated with a unique user identification number (UID). A UID can be
any whole number up to 2147483647.
Systems use the UIDs to identify users who are logging in as well as owners of files and
directories. For ease of management, an individual with accounts on different systems should
10 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
About User Accounts and Groups
use the same user name and UID. UIDs are required for both regular user accounts and special
system accounts.
UNIX™ Groups
A group, also known as a UNIX group, is a collection of users who can share files and other
system resources, such as users who are working on the same project.
Users are added to groups. Permissions granted to groups control the types of access that
members have to files or directories.
Each group must have a name and a group identification (GID) number. The GID identifies the
group internally to the system.
A user can belong to two types of groups:
■ Primary group – automatically created by the operating system. The group is given access
rights to specific files, including those that are created by the user. Each user must belong to
a primary group. By default, a new user is added to the staff group (GID 10).
■ Secondary group – manually created to which users are added as members. Users can
belong to up to 1024 supplemental groups.
The priority of secondary groups vary. For example, file ownership requires membership in a
primary group. But other applications might rely on a user's belonging to a secondary group
regardless of the user's primary group.
Groups can be local to a system or managed through a name service. To simplify group
administration, use the LDAP directory service to centrally manage group memberships.
User Passwords
You can specify the password for a new user or force the user to specify a unique password at
the user's initial login.
By default, the minimum password length is set to 8 bytes by the PASSLENGTH parameter of the
/etc/default/passwd file. This file includes other configurable parameters that together form
the password policy that is enforced at your site.
Policies surrounding password creation and changes must implement the strictest security
standards possible such as use of special characters, restricting the reuse of old passwords, case
sensitivity, allowing longer passwords, and so on. These practices help prevent password theft
and consequent security breaches.
Oracle Solaris has other security features other than passwords. Refer to the Securing the
Oracle Solaris Operating System shelf in https://docs.oracle.com/cd/E37838_01/.
Home Directories
The home directory is the portion of a file system that is allocated to a user for storing private
files. You determine the amount of space to allocate for home directories.
A home directory can be either on the local system or on a remote file system. By convention
the home directory should be created as /export/home/username. For a large site, you should
store home directories on a server.
Regardless of the home directory location, users usually access their home directories through a
mount point named /home/username.
If AutoFS is used to mount home directories, the home mount point acquires a special
status. Thus, you cannot create any directories on that mountpoint on any system. For more
information about auto-mounting home directories, see “Autofs Administration” in Managing
Network File Systems in Oracle Solaris 11.4.
Directory Services
Oracle Solaris 11.4 uses LDAP as its directory service. The directory service enables you
to store user account information in a centralized manner. The service provides ease of
connections to different systems and also ensures consistent user account information.
12 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
About User Accounts and Groups
Never use the nobody and nobody4 accounts for running processes. These accounts
are reserved for use by NFS. Use of these accounts for running processes can lead to
unexpected security risks. Processes that need to run as non-root should use the daemon or
noaccess accounts.
■ System account configuration – Never change the configuration of the default system
accounts, including the login shell of a system account that is currently locked. The only
exception to this rule is the setting of a password and password aging parameters for the
root account.
Changing a password for a locked user account changes the password but no longer unlocks
the account at the same time. A second step to unlock the account by using the passwd -u
command is now required.
The next sections further describe limitations to observe when assigning UIDs and GIDs.
Reserved UIDs
The following table lists the UID ranges that are assigned to user and system accounts.
Of the UIDs reserved for the OS, root typically has 0, daemon 1, and pseudo-user bin 2.
As with user names, adopt a scheme for assigning unique UID numbers. For example, some
companies assign unique employee numbers. Then, administrators add a number to the
employee number to create a unique UID for each employee.
To minimize security risks, avoid reusing UIDs from deleted accounts. If you must reuse a UID,
remove the account information completely so that the new user is not affected by attributes set
for a previous user.
■ In the /etc/passwd and /etc/shadow files when you are using /etc files
■ In the people container when you are using LDAP
Group information is stored in LDAP's group container. LDAP also supports password aging.
As you add or remove packages from the system, additional users and groups are created or
removed in the file. You do not perform any administrative tasks on this file.
The fields in the passwd file are separated by colons and contain the following information:
username:password:UID:GID:comment:home-directory:login-shell
For example:
14 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
User and Group Commands
For a complete description of the fields in the passwd file, see the passwd(1) man page.
This file stores encrypted user passwords and related information. Typically, you do not
manually administer this file.
For the regular user, the fields in the shadow file are separated by colons and contain the
following information:
username:password:lastchg:min:max:warn:inactive:expire
For a complete description of the fields in the shadow file, see the shadow(5) man page.
This file is a local source of group information. After installation, groups are created by default
that support some system-wide tasks such as printing, network administration, or electronic
mail. Most of these groups have corresponding entries in the /etc/passwd file.
The fields in the group file are separated by colons and contain the following information:
group-name:group-password:GID:user-list
For example:
bin::2:root,bin,daemon
For a complete description of the fields in the group file, see the group(5) man page.
The commands described in the following table are used for managing users, roles, and groups.
userdel(8) Deletes a user from the system or from the “How to Delete a User” on page 28
LDAP repository. Can involve additional
cleanup, such as cron job removal.
roleadd(8) Manages roles locally or in an LDAP “Assigning Rights to Users” in Securing
repository. Roles cannot log in. Users assume Users and Processes in Oracle Solaris 11.4
rolemod(8) an assigned role to perform administrative
tasks.
roledel(8)
groupadd(8) Manages groups locally or in an LDAP “How to Add a Group” on page 29
repository.
groupmod(8)
groupdel(8)
The following table describes the commands that system administrators can use to obtain
information about user accounts. This information is stored in various files within the /etc
directory.
16 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
About the User Work Environment
The groups command lists the groups to which a user belongs. A user can have only one
primary group at a time. However, through the newgrp command, users can temporarily change
their primary group.
Note - This guide does not provide a comprehensive information about shells. For details, refer
to the shells' corresponding man pages. For bash, the default shell for Oracle Solaris users, see
the following:
■ https://www.gnu.org/software/bash/manual/
This page provides links to the same documentation in different file formats.
■ http://www.tldp.org/LDP/Bash-Beginners-Guide/html/
Oracle Solaris uses user rights management to implement security and provides an alternative
to using the superuser model. Based on this implementation, users are assigned profile shells so
they can also run privileged applications. Thus, when you display shell information, you might
see output similar to the following:
$ echo $SHELL
/usr/bin/pfbash
$ which bash
/usr/bin/bash
Other supported shells have corresponding profile shells, such as pfksh, pfcsh, and so on.
For more information about rights, profiles, and roles, see Chapter 1, “About Using Rights to
Control Users and Processes” in Securing Users and Processes in Oracle Solaris 11.4.
■ User initialization files – a shell script that sets up a work environment for a user after the
user logs in to a system. The file defines the characteristics of user work environment, such
as search paths and several environment variables. The user initialization file is stored in the
user's home directory.
■ Site initialization file – initialization file that typically resides on a server or a set of
servers. Because of its central location, this file enables administrators to introduce
new functionality to the user's work environment while maintaining the user's ability to
customize the user's own initialization file. The site initialization file is referenced through a
line that is added at the beginning of user initialization file in the following format:
. /net/machine-name/export/site-files/site-init-file
■ $HOME/.bash_profile
■ $HOME/.bash_login
■ $HOME/.profile
The /etc/profile and /etc/.login files can be used to perform global definitions that would
apply to all users of a system, in addition to any user specific definitions in user initialization
files. However, these files still reside locally on the system, and therefore not centrally
administered. The global definitions would not apply if the user goes to another system. Thus,
for example, if AutoFS is used to mount the home directory from any system on the network,
you would have to modify the system initialization files on each system to ensure a consistent
18 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
Default File Permissions (umask)
environment whenever a user moved from system to system. As best practice, do not use these
files.
When you create a file or directory, the default file permissions assigned to the file or directory
are controlled by the user mask. The user mask is set by the umask command in a user
initialization file. You can display the current value of the user mask by typing umask and
pressing Return.
The user mask contains the following octal values:
To determine the umask value that you want to set, subtract the value of the permissions you
want from 666 (for a file) or 777 (for a directory). The remainder is the value to use with the
umask command. Suppose that you want to change the default mode for files to 644 (rw-r--
r--). The difference between 666 and 644 is 022, which is the value you would use as an
argument to the umask command.
The following table provides umask values. It shows the file and directory permissions that are
created for each of the octal values of umask.
0 rw- rwx
1 rw- rw-
2 r-- r-x
3 r-- r--
4 -w- -wx
5 -w- -w-
6 --x --x
7 --- (none) --- (none)
The following line in a user initialization file sets the default file permissions to rw-rw-rw-.
umask 000
If you are managing physical and virtual operating systems, servers, and storage devices within
a large deployment, rather than just managing individual systems, you can use the management
solutions available in the Oracle Enterprise Manager Ops Center.
With the Enterprise Manager Ops Center you can manage users and roles for the overall data
center. You can add existing local users from your individual systems as users in the Ops
Center, and you can control what assets and features these users are authorized to use.
20 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
♦ ♦ ♦
2
C H A P T E R 2
This chapter provides basic information for setting up and managing user accounts by using the
command-line interface (CLI). It covers the following topics:
To administer a user account, you must have the appropriate rights profile such as the User
Management rights profile. The tasks in this guide assumes that you have these rights. For
22 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
How to Customize User Initialization Files
more information, see “Using Your Assigned Administrative Rights” in Securing Users and
Processes in Oracle Solaris 11.4.
If you are setting up user accounts by using LDAP, you would need to specify LDAP
as the repository for user information. Then you can assign user attributes to the user
accounts. For more information, see “How to Assign Default User Attributes for LDAP
Accounts” on page 31.
For security, you can label processes and files that would control user access to sensitive files.
See Chapter 6, “Labeling Processes for Data Loss Protection” in Securing Users and Processes
in Oracle Solaris 11.4.
Caution - Do not try to change the users' output with the pkg search command.
$ su -
Password:
#
For more information, see “Using Your Assigned Administrative Rights” in Securing Users and
Processes in Oracle Solaris 11.4.
# mkdir /shared-dir/skel/user-type
shared-dir The name of a directory that is available to other systems on the network
user-type The name of a directory to store initialization files for a type of user
3. Copy the default user initialization files into the directories that you created for
different types of users.
6. Verify that the permissions for the user initialization files are correct.
# ls -la /shared-dir/skel/*
In the following procedure, the administrator customizes a roles directory . The administrator
then changes the default home directory and skeleton directory for all roles.
24 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
Managing User Accounts by Using CLI
For example:
# roleadd -D
group=other,1 project=default,3 basedir=/home
skel=/etc/skel shell=/bin/pfsh inactive=0
expire= auths= profiles=All limitpriv=
defaultpriv= lock_after_retries=
3. Change the default home directory and skeleton directory for all roles.
For example:
Further use of the roleadd command will now create home directories in the /export/home
directory and will populate the roles' environment from the /etc/skel/roles directory.
-ddir Specifies the location of the home directory of the user. An optional
server name can be added to the directory path, such as system1:/home/
export/jdoe. The host information is written to auto_home and used by
the automounter to mount the home directory.
-m Creates a local home directory on the system for the user if the directory
does not yet exist. However, if the -d option specifies a host that is
remote, then the home directory is not created.
If the directory does not yet exist, the home directory is created under
the parent directory which is assumed as the the mount point of a ZFS
dataset, such as export/home. The newly created directory is created as a
multilevel dataset.
-S ldap This option indicates that you are using LDAP and its repository for
the account information. If you use LDAP, you can also assign default
attributes by to the default@ user name which are applied to all users.
For example:
Multiple values can be specified for user-attributes and use the format
key=value. These attributes are detailed in the user_attr(5) man page.
For more information, see “How to Assign Default User Attributes for
LDAP Accounts” on page 31.
-z yes|no| Specifies the default behavior of the useradd command when using the
nodelegation -z option.
See Also After creating a user, you might need to perform some additional tasks, including adding and
assigning roles to a user, and displaying or changing the rights profiles of a user. For more
information, see “Creating a Role” in Securing Users and Processes in Oracle Solaris 11.4.
26 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
How to Modify a User Account
See the usermod(8) man page for details about the arguments and options that you can specify
with the usermod command.
This example shows how to modify a user to set PAM policy. This particular modification
specifies that user jdoe should only be authenticated with the Kerberos V5 protocol for all PAM
services. For more information, see the pam_user_policy(7) man page.
# usermod -K pam_policy=krb5_only jdoe
See Also For additional information, see “Creating a Role” in Securing Users and Processes in Oracle
Solaris 11.4.
2. Check the status of the user account that you need to unlock.
$ passwd -s username
username LK
$ passwd -s username PS
Note - For more information about unlocking a user account, see “Guidelines for Assigning
User Names, UIDs, and GIDs” on page 12 and the passwd(1) man page.
$ su -
Password:
#
$ userdel -r username
$ userdel username
For a full list of command options, see the userdel(8) man page.
28 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
How to Add a Group
Next Steps Additional cleanup might be required if the user that you deleted had administrative
responsibilities, for example creating cron jobs, or if the user had additional accounts in non-
global zones.
1. Become an administrator with the root role or an administrator who has the
solaris.group.manage authorization.
See “Using Your Assigned Administrative Rights” in Securing Users and Processes in Oracle
Solaris 11.4.
Example 2 Setting Up a Group and User With the groupadd and useradd Commands
This example shows how to use the groupadd and useradd commands to add the group
scutters and the user scutter1 to files on the local system.
# groupadd -g 102 scutters
# useradd -u 1003 -g 102 -d /export/home/scutter1 -s /bin/csh \
-c "Scutter 1" -m -k /etc/skel scutter1
64 blocks
For more information, see the groupadd(8) and useradd(8) man pages.
2. Add a new user account and specify the base directory for the same.
# useradd -z no -m username
80 blocks
Note - Make sure you have the User Security rights profile assigned in order to assign
passwords.
4. The home directory of the user account is created in the /export/home directory.
# cat /etc/passwd
root:x:0:0:Super-User:/root:/usr/bin/bash
daemon:x:1:1::/:/bin/sh
bin:x:2:2::/:/bin/sh
sys:x:3:3::/:/bin/sh
adm:x:4:4:Admin:/var/adm:/bin/sh
dladm:x:15:65:Datalink Admin:/:
netadm:x:16:65:Network Admin:/:
netcfg:x:17:65:Network Configuration Admin:/:
sshd:x:22:22:sshd privsep:/var/empty:/bin/false
smmsp:x:25:25:SendMail Message Submission Program:/:
username:x:167:10::/export/home/username:/usr/bin/bash
Use the following command to create a user account with a home directory that is a directory
rather than a ZFS file system:
30 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
How to Assign Default User Attributes for LDAP Accounts
# useradd -D -z no
Example 4 Creating a User Account With a Home Directory That Is a ZFS File System With Delegations
Use the following command to create a user account with a home directory that is a ZFS file
system with the mount, create, and snapshot delegations:
# useradd -D -z yes
Example 5 Creating a User Account With a Home Directory That Is a ZFS File System Without Delegations
Use the following command to create a user account with a home directory that is a ZFS file
system without delegations:
# useradd -D -z nodelegation
For LDAP accounts, an administrator can assign qualified user attributes to users by using the
default account name default@. The useradd, usermod, and userdel commands have been
modified to support this account name. The following example shows how to create a default
account and assign default user attributes to users based on their netgroup membership.
1. Become an administrator.
See “Using Your Assigned Administrative Rights” in Securing Users and Processes in Oracle
Solaris 11.4.
2. Create the default and test accounts in the LDAP name service.
# cat netgroups
dba (,admin1,) (,admin2,)
web (,admin3)
You can assign a clearance label to each user, which restricts users' access to confidential
process information. You set the value for clearance label in the encodings file. When you
assign a specific clearance to a user you should also assign the user a multilevel home
directory as shown in the next procedure.
About sharing and unsharing file systems, see also “Autofs Administration” in Managing
Network File Systems in Oracle Solaris 11.4.
1. Become an administrator.
32 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
How to Share Home Directories That Are Created as ZFS File Systems
See “Using Your Assigned Administrative Rights” in Securing Users and Processes in Oracle
Solaris 11.4.
For example:
For example:
4. (Optional) Assign a multilevel home directory to users who have been assigned
a specific clearance.
When using this new syntax, each file system contains an "auto share" that is created as soon
as the share.nfs property (or the share.smb property) is set to on for that file system. The
previous command shares a file system named users/home and all of its children.
7. Confirm that the descendent file system shares are also published.
For example:
When creating user accounts, make sure home directories are set up as they are in the name
service, at /home/username. Then, make sure that the auto_home map indicates the NFS path
to the user's home directory. For task-related information, see “Autofs Administration” in
Managing Network File Systems in Oracle Solaris 11.4.
If you need to manually mount a user's home directory, use the zfs mount command. For
example:
Note - Make sure that the user's home directory is shared. For more information, see “How to
Share Home Directories That Are Created as ZFS File Systems” on page 32.
34 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
♦ ♦ ♦
3
C H A P T E R 3
This chapter describes how to set up and manage user accounts by using two new applications
which provide menu-based user management. It covers the following topics:
■ “Security Considerations”
■ “About the useradm Application”
■ “About the Oracle Solaris Account Management BUI”
Security Considerations
The Oracle Solaris Account Manager BUI and the useradm application have the same security
policy. Neither application requires any special privileges. The authorizations associated with
the account that is used for the RAD connection determines the attributes that can be viewed
or modified. A user account with the User Security rights profile can assign any of its user
attributes (roles, profiles, labels, privileges, and authorizations) to other users. An account with
all authorizations such as the root role can create new accounts and assign any attribute to
them.
In order to assign user attributes which are not currently assigned to you, the corresponding
solaris.*.assign authorization needs to be added to your user attributes. For example, to
assign additional profiles to a user, the user who invokes the useradm application must have the
solaris.profile.assign authorization. For more information, see “User Rights Management”
in Securing Users and Processes in Oracle Solaris 11.4.
The useradm tool can be used as a command line or interactively. This section focuses on the
interactive mode of that tool.
The interative useradm application replaces the Visual Panels User Manager. This application
is a remote administration daemon (RAD) client which provides a menu-driven interface for
setting up and managing user accounts. Though the application connects to local RAD servers
by default, it can connect to remote RAD servers too. The application provides easier user
management, password management, and role management options. Any terminal emulator like
putty or the Secure Shell (ssh) service can be used to start this application locally or remotely.
Whether in command line mode or interactive mode, use of useradm requires that you must
be an administrator or assume a role which has been assigned the User Security rights profile.
See “Using Your Assigned Administrative Rights” in Securing Users and Processes in Oracle
Solaris 11.4.
For more details about the useradm command, see the useradm(8) man page.
1. Become the administrator or assume the role that has been assigned the
appropriate installation rights.
$ export TERM=xterm-256color
4. If using the application remotely, enable the rad:remote SMF service on the
remote system.
36 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
How to Install the useradm Application
-S specifies the naming service repository to use. The choices are files to store account
information locally or ldap to have the information managed by LDAP.
-q specifies the hostname or netgroup to use for the attributes maintained in the user_attr
LDAP container. This option applies only to existing accounts that are maintained by the
LDAP name service.
-R specifies the URI to connect to a remote RAD server.
All the following sample commands open the useradm interactive window.
Likewise, the following commands connect to a remote server and run useradm interactively.
Ensure that the rad:remote SMF service is enabled.
■ Starting the useradm application locally while specifying a remote RAD server.
In this example, the application is started on one server to modify a user on another server.
The user account to log in to the server specified with -R option – jean in this example
– is used to manage mary's account settings. Ensure that jean is assigned either the User
Security rights profile or has the solaris.auth.delegate authorization on server2.
The following list explains the different options or attributes you can set for users:
Access Times Specify the days and times at which specific services can be accessed.
Account Type Specify whether the account you are working with is a normal user
account or a role.
Annotation Specify whether the user must provide an explanation if they are
assuming a role or using an authenticated rights profile
Groups Assign a primary group and secondary group to user accounts. Available
choices in the Group list depends on your system's configuration. When
you specify -S files, the list of groups that is displayed is the local list.
Otherwise, the list of groups is a combination of local and LDAP groups
Home Directory (Optional) If you do not provide any information, the system
automatically assigns a default home directory
38 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
How to Manage Users and Roles Interactively
Idle Session Specify the timeout for a user account in case the user is inactive for a
certain amount of time. You can also specify the action to be taken at
timeout
Labels Assign a minimum label and clearances to each user account to restrict
their access to confidential process information
PAM Policy Specify the PAM policy for the user. For more information, see the
pam_user_policy(7) man page
Privileges Specify default privileges that are assigned to the user's initial login shell
Profiles Assign the rights profile to a user from a list of available profiles. You
can also specify if they need re authentication when used
Project Displays a list of available projects that can be assigned as the user's
default
Trusted Path Specify whether the user can remotely access the Trusted Path to manage
the RAD services running in immutable zones
Tip - To quickly go to the attribute of your choice, type the first few letters of the attribute.
2. From the attribute's submenu, select the setting for that attribute.
Configure as many attributes as you want.
3. To save your changes, select Commit from the main menu and press Enter.
The Oracle Solaris Account Management browser user interface (BUI) provides a browser-
based account manager which has the same functionality as the useradm application. You can
access this BUI using the Oracle Solaris Dashboard. This BUI supports all the functionalities
of useradd, usermod, userdel, roleadd, rolemod, passwd, and login commands through its
interactive menu. It is included in the system/management/webui/webui-usermgr package.
See “Using Your Assigned Administrative Rights” in Securing Users and Processes in Oracle
Solaris 11.4.
https://hostname:6787/solaris
40 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
How to Access the Oracle Solaris Account Management BUI
Note - The initial display of either of the two labeling dialogs (Minimum Label or Clearance)
might be rendered incorrectly. As a workaround, select the other labeling menu item, and then
reselect the previous item.
B E
bin group, 10 encryption, 14
/etc files
user account information, 12
user account information and, 12
C /etc/passwd file, 14, 14
changing description, 14
account defaults, 24 user ID number assignment and, 13
user passwords, 12, 12 /etc/shadow file description, 14
controlling access to files, 19 /export/home file system, 12
43
Index
G M
group file managing user accounts
description, 14 Account Manager BUI, 35
fields in, 15 using the useradm application, 35
group ID numbers, 10, 11, 11, 13 maximums
groupadd command, 16, 29 secondary groups users can belong to, 11
groupdel command, 16 user ID number, 10
groupmod command, 16 user login name length, 12
groups modifying
adding, 29 users
changing primary, 17 interactively, 37
default, 11 using the useradm application, 37
description, 11 mounting
displaying groups a user belongs to, 17 user home directories, 34
guidelines for managing, 11, 11 mounting user home directories, 18
ID numbers, 10, 11, 11
names, 11
naming services and, 11
primary, 11, 11 N
secondary, 11, 11 names
storage of information for, 14, 15 group, 11
UNIX, 11 naming services
groups command, 17 groups and, 11
user accounts and, 12, 14
newgrp command, 17
noaccess user/group, 10
H nobody user/group, 10
home directories See user home directories
/home file system
user home directories and, 12
O
Oracle Solaris
Account Management BUI, 40
I
ID numbers
group, 10, 11, 11
user, 13 P
initialization files passwd command
customizing assigning user password with, 25
44 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021
Index
45
Index
useradm application
adding a user, 37
attribute options, 37
for managing user accounts, 35
introduction, 35, 35
manage users and roles, 39
modify a user , 37
remote systems, 39
start the interface, 36, 37
userdel command, 16
deleting user, 28
usermod command, 16
users
adding, 25, 28
managing in Ops Center, 20
removing home directories, 28
setting account defaults, 24
unlocking, 27
uucp group, 13
Z
ZFS file systems
sharing, 32
user accounts as, 22
46 Managing User Accounts and User Environments in Oracle Solaris 11.4 • August 2021