Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am attempting to script a system for automatically deploying new Cisco switches (Cisco 3012 switches for an IBM BladeCenter, to be specific).

I need to get telnet access into the new switches, however by default there is no password set:

victor:~ # telnet
Connected to
Escape character is '^]'.

Password required, but none set
Connection closed by foreign host.

I need to issue commands over the web interface to modify the default configuration. How do I do so?

(no, I can't use CNA)

share|improve this question
up vote 3 down vote accepted

To set the line password and enable secret over http:


With the enable secret set, you now need to enter the secret as a password to use the web interface.

Via HTTP, you can execute arbitrary commands in either exec mode or configure mode via:


To get assistance executing commands in the web interface, access:


This will lead you down the path of finding out how to do various other things. For example, to configure an interface you need to do:


(many thanks to @Justin who led me down the right path)

share|improve this answer

Can you log into the web interface with the enable password? if so, you can fix this..

if you click 'monitor' and then 'configure' and then 'line' and then 'vty' and then enter 0 and then click 'password' you should arrive at a link that looks like this:


that form should set the password, at which point telnet will work.

edit: oh, and while this will work, unless there is something preventing you from using the console port, you should really use that.

share|improve this answer
Using the console port would be fine for the first 10 or switches, but would get VERY tedious by the time I got to switch number 75... – MikeyB Jan 4 '10 at 4:29
it is trivial to automate a configuration session over the serial port, if that is what you mean by tedious. – Justin Jan 4 '10 at 5:30

It should be fairly simple to capture the request details that set the password, however that might not help if Cisco have tried to be "smart" about things (which they probably have).

Having a small static text file that sets the password when pasted into a console session is probably your best option.

share|improve this answer
That is what I'm currently working on, though I was hoping that someone already had the necessary magic worked out. :) – MikeyB Jan 4 '10 at 2:12

You have to use console cable. I am not sure about web-interface, but telnet won't let you to enter switch, if you haven't specified enable password. So WUI probably works the same, because it uses enable password for authentification.

share|improve this answer
it's been a while since I tested this, but I'm pretty certain the error above is what you get when the 'line vty' password is not set, and has nothing to do with the enable password – Justin Jan 4 '10 at 0:21
The web interface allows you to set the vty and enable passwords in a default configuration (at least on this switch). – MikeyB Jan 4 '10 at 2:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.