Re: Multiple autocommands for a user

From: dagbo (goddardtek@nc.rr.com)
Date: Thu Mar 15 2007 - 22:01:07 ART


Brian,

  Thanks! I was thinking a tclsh script might work, but the big piece I
couldn't figure out was how to get the script to stay with the router
through a reload. Here is what I figured out I can do:

1) create a text file called sho_commands.tcl that has the following in it:
show run
show ver
show interfaces

2) tftp or ftp the tcl file to flash on the device

3) then on the device do this:

conf t
username dave pass cisco
username privilege level 15
username dave autocommand tclsh flash:sho_commands.tcl

This works! My only complaint is that I have to copy the tcl file from a
tftp or ftp server to the device - any ideas on how to get around that?

thanks!
Dave

----- Original Message -----
From: "Brian McGahan" <bmcgahan@internetworkexpert.com>
To: "dagbo" <goddardtek@nc.rr.com>; "CCIE Group" <ccielab@groupstudy.com>
Sent: Thursday, March 15, 2007 4:19 PM
Subject: RE: Multiple autocommands for a user

You could write a tcl script that runs the show commands and
then have the autocommand call the tcl script when they login.

HTH,

Brian McGahan, CCIE #8593 (R&S/SP)
bmcgahan@internetworkexpert.com

Internetwork Expert, Inc.
http://www.InternetworkExpert.com
Toll Free: 877-224-8987 x 705
Outside US: 775-826-4344 x 705
24/7 Support: http://forum.internetworkexpert.com
Live Chat: http://www.internetworkexpert.com/chat/

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
dagbo
Sent: Thursday, March 15, 2007 10:06 AM
To: CCIE Group
Subject: Multiple autocommands for a user

Hello group,

  is there anyway to have a local user account configured to do more
than one
single command upon logging in? My only other idea would be to offer a
menu
that allows for the different commands. For example, I'd like for when
user
dave logs in, to have the following commands be executed:

show start
show cdp neighbors
show interfaces

and then exit user dave back out of the device.

If I do this:

username dave pass cisco
username dave autocommand show start
username dave autocommand show ver

the "show ver" config overwrites the "show start" command. Any idea's?

thanks,
Dave



This archive was generated by hypermail 2.1.4 : Sun Apr 01 2007 - 06:35:51 ART