Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

PIX and unix scripts

Hi,

I am trying to use a simple script to backup my network devices' configurations automatically. It works for all of them except our PIX 525. It uses telnet and telnet access is configured for the originating machine in the PIX.

When I run the script it can connect and login to the PIX (user level) but nothing happens after that (PIX does not accept any other command via the script). I was wondering if there is any way to fix this.

Thanks a lot,

Ali

2 REPLIES
New Member

Re: PIX and unix scripts

To copy the the configuration in the PIX to TFTP, you need to have enable access.

If you are worried about the security implications of your script doing enable, you can add users to the PIX local database, then set up priviledge levels, with your script user only being able to do a "write net"

New Member

Re: PIX and unix scripts

Thanks for your quick reply. My problem is the fact that I cannot go to enable mode with the script or even run anything else at user level prompt. Also my intention is to copy and paste the running configuration (wri t and then copy-paste the output). I can telnet to the PIX from the unix box and go to enable mode and etc with no problem but if I do the same steps from the same machine by using a script, it does not go further than the first step (getting to user mode prompt).

And this is the script:

DATE=`date +'%y%m%d'`

TAG=$DATE

(echo "password";\

echo "term len 0";\

echo "en";\

echo "password";\

echo "wri t";\

echo "show access-lists";\

echo "exit";\

echo "q";\

sleep 30) | telnet 10.10.10.10 > /logs/conf_backup/pix.$TAG

Ali

152
Views
0
Helpful
2
Replies