Cisco ASA: Why do I sometimes need a username/password when entering enable mode

ciscocisco-asa

I'm automating some interaction with Cisco ASA devices. I need to do the following:

  1. login over ssh
  2. send 'enable', provide enable password
  3. send 'configure terminal'
  4. send some other commands, never going to deeper level of config.
  5. send exit (gets me back to enable mode prompt)
  6. disable (should get me back to the basic prompt)

Then a bit later, another scripted bit tries to send 'enable' again. This time, the device asks for a username and password. Not just the enable password. This happens consistently on some devices I have tried and never on others. I'm guessing it is something to do with 'disable'. I don't have to use that command, I just need to drop from enable mode back to a regular prompt so that future bits can always expect to start from the base '>' prompt.

Apologies in advance if this is too basic of a question. Any ideas?

Best Answer

Ahh, the answer appears to be this configuration setting:

   aaa authentication enable console LOCAL

With that, disable then enable will require a password.