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
(5) man page.
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.4.
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.***