- A virtual community of network engineers
 Home  BookStore  StudyNotes  Links  Archives  StudyRooms  HelpWanted  Discounts  Login
Re: Multiple autocommands for a user posted 03/15/2007
[Chronological Index] [Thread Index] [Top] [Date Prev][Date Next] [Thread Prev][Thread Next]


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?


----- Original Message ----- From: "Brian McGahan" <bmcgahan@xxxxxxxxxxxxxxxxxxxxxx>
To: "dagbo" <goddardtek@xxxxxxxxx>; "CCIE Group" <ccielab@xxxxxxxxxxxxxx>
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.


Brian McGahan, CCIE #8593 (R&S/SP)

Internetwork Expert, Inc.
Toll Free: 877-224-8987 x 705
Outside US: 775-826-4344 x 705
24/7 Support:
Live Chat:

-----Original Message----- From: nobody@xxxxxxxxxxxxxx [mailto:nobody@xxxxxxxxxxxxxx] 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
that allows for the different commands. For example, I'd like for when
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?


Subscription information may be found at: