28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

192.168.15.2;<br />

}<br />

##<br />

## login: Names, login classes, and passwords for users<br />

## require: admin<br />

##<br />

login {<br />

##<br />

## Login class name<br />

## match (regex): ^[[:alnum:]_-]+$<br />

##<br />

The only way to find out the permissions for operational mode commands is to look<br />

in the JUNOS product documentation.<br />

Login classes have one more feature to help with basic router security. You can set a<br />

time after which all users in that class are automatically logged out if they have not<br />

typed anything at the keyboard. (By default, a user can remain logged in indefinitely.)<br />

Here, the users in the class we created will be automatically logged out if the keyboard<br />

is idle for five minutes:<br />

[edit system login]<br />

aviva@router1# set class operator-plus-read-config permissions idle-timeout 5<br />

Warning messages are displayed beforehand:<br />

aviva@router1> show system users<br />

9:56PM up 18:48, 2 users, load averages: 0.16, 0.09, 0.04<br />

USER TTY FROM LOGIN@ IDLE WHAT<br />

aviva p0 server.juniper.net 9:42PM 4 cli<br />

aviva@router1> Warning: session will be closed in 1 minute if there is no acti<br />

vity<br />

Warning: session will be closed in 10 seconds if there is no activity<br />

Idle timeout exceeded: closing session<br />

Connection closed by foreign host.<br />

As if all this control weren’t enough, you can also control, down to the specific command<br />

and configuration hierarchy level, what commands users in a particular login<br />

class can and cannot issue and what portions of the configuration they can view and<br />

modify. For example, you can create a class that has the standard operator permissions<br />

but also can issue the request system support command to collect information<br />

to send when reporting a problem with the router:<br />

[edit system login]<br />

aviva@router1# set class operator-plus-support permissions [ clear network reset<br />

trace view ]<br />

aviva@router1# set class operator-plus-support allow-commands "request support<br />

information"<br />

Or you can take the basic operator class and modify it so users can issue all clear<br />

commands except clear system commit (which clears pending configuration commit<br />

operations) and clear system reboot (which clears pending router reboots):<br />

[edit system login]<br />

94 | Chapter 2: Basic Router Security and Access Control<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!