S11.4CS: General Administration - Users and roles

Oracle Solaris 11.4 General Administration

Users and Roles

Revert root to a normal user account
# rolemod -K type=normal root
Configure root as a role (default)
# usermod -K type=role root
Configure root role to use the user password instead of root password
# rolemod -K roleauth=user root
Add a new user and delegate the System Adminstrator profile to the user
# useradd -m -P "System Administrator" joerg
Add a new user with a ZFS file system as the user’s home directory and add an entry in auto_home
# useradd -m -d localhost:/export/home/joerg2 joerg2
# grep "joerg2" /etc/passwd
joerg2:x:101:10::/home/joerg2:/usr/bin/bash
# cat /etc/auto_home
[...]
joerg2 localhost:/export/home/joerg2
+auto_home
# zfs list | grep joerg2
rpool/export/home/joerg 35K 201G 35K /export/home/joerg2
Add a new user on a second server using another NFS server for the user’s home directory
# useradd -d nfsserver:/export/home/joerg2 joerg2
# grep "joerg2" /etc/passwd
joerg2:x:103:10::/home/joerg2:/usr/bin/bash
# tail -2 /etc/auto_home
joerg2 nfsserver::/export/home/joerg2
+auto_home
Set the default to create an own delegate ZFS filesystem for each homedirectory (11.4)
# useradd -D -z yes
Set the default to create an own *un*delegated ZFS filesystem for each homedirectory (11.4)
# useradd -D -z nodelegation
Set the default to create only a subdirectory as home directory (11.4)
# useradd -D -z no
Use the ncurses-based user administration tool to edit a user with prior installation (11.4)
# pkg install useradm
# useradm modify junior
Use the ncurses-based user administration tool to edit a user (11.4)
# useradm add junior