Description

This KB article explains how to configure cli idle-timeout for any user or group of users as a part of active configuration.
 

Solution

Step 1:  First we are required to define a class and set the appropriate permission for that class.  Then we have to configure idle-timeout for that class.

{master:0}[edit system login]
root@VMWNL301# set class demo permissions all idle-timeout 2

We have defined a class called demo with the permission “all” in its property. This is equivalent to the system defined class “super user”. The idle time-out is set to 2 minute.

Step 2 : Create a user and map user to the class. The mapped user will inherit all the permissions and properties defined for that class.

{master:0}[edit system login]
root@VMWNL301# set user jtac class demo authentication plain-text-password

User “jtac” associated with this class will inherit the idle-timeout property of 2 minute.

Step 3 : Commit the configuration

{master:0}[edit system login]
root@VMWNL301#commit

Step 4 : Verify the configuration

{master:0}[edit system login]
root@VMWNL301# show
class demo {
idle-timeout 2;
permissions all;
}
user jtac {
uid 2001;
class demo;
authentication {
encrypted-password "$ABC123"; ## SECRET-DATA
}
}

Step 5 : Try login with the user name “jtac”.


VMWNL301 (ttyu0)

login: jtac
Password:

--- JUNOS 10.0R3.10 built 2010-04-16 06:31:54 UTC
{master:0}
jtac@VMWNL301>

Step 6 : Check the CLI settings :

jtac@VMWNL301> show cli
CLI complete-on-space set to on
CLI idle-timeout set to 2 minutes
CLI restart-on-upgrade set to on
CLI screen-length set to 24
CLI screen-width set to 80
CLI terminal is 'vt100'
CLI is operating in enhanced mode
CLI timestamp disabled
CLI working directory is '/var/home/jtac'