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
    # usermod -R " " admin
  3. Change the root role into a user.
    # rolemod -K type=normal root
  4. Verify the change.
    • # getent user_attr root

      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.


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


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.