System Administration Guide: Security Services

How to Prevent Remote Login by Superuser (root)


Note –

Superuser login is restricted to the console by default when you install the Solaris release.


  1. Become superuser or assume an equivalent role.

  2. Edit the /etc/default/login file.

  3. Uncomment the following line:


    CONSOLE=/dev/console

    When superuser access is restricted to the console, you can log in to a system as superuser only from the console. Any users who try to remotely log in to this system must first log in with their user login. After logging in with their user name, users then use the su command to become superuser.

  4. Attempt to log in remotely as superuser to this system, and verify that the operation fails.