Technical Documentation

Configuring Time-Based User Access

The JUNOS Software enables you to configure time-based restrictions for user access to log in to a device. This is useful for restricting the time and duration of user logins for all users belonging to a login class. You can specify the days of the week when users can log in, the access start time, and the access end time.

  • To configure user access on specific days of the week, without any restrictions on the duration of login, include the allowed-days statement only.
    [edit system]login {class class-name {allowed-days [ days-of-the-week ];}
  • To configure user access on all the days of the week for a specific duration, include the access-start and access-end statements only.
    [edit system]login {class class-name {access-start HH:MM;access-end HH:MM;}}
  • To configure user access on specific days of the week for a specified duration, include the allowed-days, access-start, and access-end statements.
[edit system]login {class class-name {allowed-days [ days-of-the-week ];access-start HH:MM;access-end HH:MM;}}

Specify the start time and end time in HH:MM (24-hour) format, where HH represents the hours and MM represents the minutes.

Note: Access start time and end time that spans across 12:00 AM on a specified day results in the user having access until the next day, even if the access day is not explicitly configured. For instance, the following configuration results in the user having access until 6:00 AM on Tuesday and Thursday, although the allowed-days statement specifies access only on Monday and Wednesday:

[edit system]login {class operator-night-shift {allowed-days [ monday wednesday ];access-start 2000;access-end 0600;}}

Published: 2010-04-26