Securing Systems and Attached Devices in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

How to Temporarily Disable User Logins

Temporarily disable user logins during system shutdown or routine maintenance.


Note -  This procedure does not affect all users. The following can continue to log in to the system despite the presence of the /etc/nologin file created by this procedure.
  • Superuser

  • Users who are assigned the root role

  • Users who are assigned the solaris.system.maintenance authorization


For more information, see the nologin (4) man page.

Before You Begin

You must become an administrator who is assigned the solaris.admin.edit/etc/nologin authorization. By default, the root role has this authorization. For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .

  1. Create the /etc/nologin file in a text editor.
    # pfedit /etc/nologin

    For an example of using the solaris.admin.edit/etc/nologin authorization, see Example 3–3.

  2. Include a message about system availability.
  3. Close and save the file.
Example 3-3  Disabling User Logins

In this example, a user is authorized to write the notification of system unavailability.

% pfedit /etc/nologin
***No logins permitted.***

***The system will be unavailable until 12 noon.***