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.

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

trace view ]<br />

aviva@router1# set class operator-plus-support deny-commands "clear system"<br />

Parallel statements allow you to fine-tune what portions of the configuration can be<br />

edited or viewed in configuration mode. This is a way to lock portions of the configuration.<br />

The following command does not allow users to modify the protocols portion<br />

of the configuration:<br />

[edit system login]<br />

aviva@router1# set class all-but-protocols permissions [ all ]<br />

aviva@router1# set class all-but-protocols deny-configuration "protocols"<br />

A user in this permission class can edit all portions of the configuration except for<br />

the [edit protocols] section:<br />

[edit]<br />

aviva2@router1# edit protocols<br />

^<br />

syntax error, expecting or .<br />

2.11 Creating a Privilege Class that Hides Encrypted<br />

Passwords<br />

Problem<br />

You need to have all permissions on the router but you don’t want to have all of the<br />

encrypted passwords displayed.<br />

Solution<br />

Create a new class that explicitly includes all the permission bits except for control<br />

and secret:<br />

[edit system login]<br />

aviva@router1# set class power-user permissions [ admin admin-control clear configure<br />

field floppy interface interface-control network reset routing routing-control shell<br />

snmp snmp-control system system-control trace trace-control view maintenance firewall<br />

firewall-control secret-control rollback security security-control access accesscontrol<br />

view-configuration ]<br />

<strong>Discussion</strong><br />

Many network operators like to trim shared secrets and other encrypted data out of<br />

their configurations before sharing the configurations with others. The JUNOS software<br />

uses the secret permission bit to control viewing access to the passwords and<br />

the secret-control permission bit to control setting them. This recipe still allows<br />

shared secrets and passwords to be set on the router, but the values are not shown,<br />

copied, or saved (using the configuration mode save command) by the user during<br />

normal operations.<br />

Creating a Privilege Class that Hides Encrypted Passwords | 95<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!