Creating root user

On Oracle Solaris 11, you need to change the root role into a user as you cannot directly log in as root user.

To change root role into a user

  1. Log in as local user and assume the root role.
    % su  - root
  2. Remove the root role from local users who have been assigned the role.
    # roles admin
    root
    # usermod -R " " admin
  3. Change the root role into a user.
    # rolemod -K type=normal root
  4. Verify the change.
    • # getent user_attr root
      root::::auths=solaris.*;profiles=All;audit_flags=lo\
      :no;lock_after_retries=no;min_label=admin_low;clearance=admin_high

      If the type keyword is missing in the output or is equal to normal, the account is not a role.

    • # userattr type root

      If the output is empty or lists normal, the account is not a role.

    Note:

    For more information, see the Oracle documentation on Oracle Solaris 11 operating system.

Note:

After installation, you may want to change root user into root role to allow local users to assume the root role.

See Changing root user into root role.