The local-user login-period command configures the period during which a local user is allowed to log in.
The undo local-user login-period command restores the default setting.
By default, the period during which a local user is allowed to log in is not configured.
Parameter | Description | Value |
---|---|---|
user-name |
Specifies the user name. |
The value is a string of 1 to 253 case-insensitive characters without spaces. If the value includes @, the characters before @ are the user name and the characters after @ are the domain name. If the value excludes @ or the domain name does not exist, the entire string is the user name and the user belongs to the default domain. A user name cannot contain two or more @s. |
begin-time |
Specifies the start time. |
The value is expressed in the format of HH:MM:SS. HH:MM:SS specifies the hour, minute, and second. The value ranges from 00:00:00 to 23:59:59. |
to |
To the end. |
- |
end-time |
Specifies the end time. |
The value is expressed in the format of HH:MM:SS. HH:MM:SS specifies the hour, minute, and second. The value ranges from 00:00:00 to 23:59:59. End time must be later than start time. |
begin-day |
Specifies the start day. |
The value can be Mon, Tue, Wed, Thu, Fri, Sat, and Sun. |
end-day |
Specifies the end day. |
The value can be Mon, Tue, Wed, Thu, Fri, Sat, and Sun. End day must be later than start day. |
Usage Scenario
To allow a local user to log in during a specified period, run the local-user login-period command.
Precautions
The local-user login-period command configures the Coordinated Universal Time (UTC) time.
After the configured period elapses, the online user is logged out.
If the local-user login-period command is run more than once, the latest configuration overrides the previous one.
A local user attribute change does not apply to online users. The change takes effect after the online users relog in.