Cathy Shehorn (Customer) asked a question.

Cisco WLC 5508 Config Backup Script Help

Hello,

I am new to WhatsConfigured....and i am having issues trying to get my cisco WLCs backup scripts working...I think the biggest issue is that once you log in the "login as:" actually needs just a carriage return then you are prompted with a "User:" were you actually put in the username, then you get the "password:"....I am getting hung up on the "login as" as the @login or @connect will always see that as needing the username/password...

 

Any help would be greatly appreciated...

thanks

 

 


  • Mike Rockwell (Progress Software)

    I believe this one will work. Let me know.

     

    1. @connect "login as: "
    2. @write $(LoginTerminator)
    3.  
    4. @read "User: "
    5. @write "$(Settings.UserName)"
    6. @write $(LoginTerminator)
    7.  
    8. @read "Password:"
    9. @write "$(Settings.Password)"
    10. @write $(LoginTerminator)
    11.  
    12. #[-] @enable
    13.  
    14. # for cisco WLC
    15. [-] config paging disable
    16.  
    17. [running-config, trim-before=/(V|v)ersion/, remove-lines="ntp clock-period"] show run-config
    18. @write $(CommandTerminator)
    19.  
    20. @logout

     

  • Cathy Shehorn (Customer)

    @Mike Rockwell (Progress Software)​ , thanks for the help on this....I tried running the above and i am stilling getting an error...

     

    I have double checked that the credentials work and i can run the running configuration with the credentials i am using... however when i try to run the running configuration through WUG, i am unable to complete the task...

     

    Thoughts?

     

    imageCOMMAND START

    connect "login as: "

     

    READ

    login as: 

     

    COMMAND END

    connect "login as: "

    Result: True

     

    COMMAND START

    write "\r\n"

     

    WRITE

     

     

     

    COMMAND END

    write "\r\n"

    Result: True

     

    COMMAND START

    read "User: "

     

    READ

     

     

     

    READ

     

     

    (Cisco Controller) 

    User: 

     

    COMMAND END

    read "User: "

    Result: True

     

    COMMAND START

    write "userID"

     

    WRITE

    userID

     

    COMMAND END

    write "userID"

    Result: True

     

    COMMAND START

    write "\r\n"

     

    WRITE

     

     

     

    COMMAND END

    write "\r\n"

    Result: True

     

    COMMAND START

    read "Password:"

     

    READ

    userID

    Password:

     

    COMMAND END

    read "Password:"

    Result: True

     

    COMMAND START

    write "password"

     

    WRITE

    6qxnrBBY

     

    COMMAND END

    write "password"

    Result: True

     

    COMMAND START

    write "\r\n"

     

    WRITE

     

     

     

    COMMAND END

    write "\r\n"

    Result: True

     

    COMMAND START

    config paging disable

     

    WRITE

    config paging disable

     

     

    READ

    ********

     

    READ

     

    (Cisco Controller) >config paging disable

     

     

    (Cisco Controller) >

     

    COMMAND END

    config paging disable

    Result: True

     

    COMMAND START

    show run-config

     

    WRITE

    show run-config

     

     

    READ

    show run-config

     

    Press Enter to continue...

     

    COMMAND END

    show run-config

    Result: False

      Command failed without errors.

      This is most likely caused by a failure to match the devices output with the expected output.

      Do you need to verify that the output matches the appropriate prompt (Command, More, UserName, Password)?

  • Mike Rockwell (Progress Software)

    When you run it manually you use the "show run-config"? Are there "more" prompts, and what are those prompts, in the CLI library for that OID, does it show the proper regex for that "more" command?

     

    You might want to call Tech. Support and have them take a look.

  • Cathy Shehorn (Customer)

    When I run it manually, after entering the "show run-config" command and hit enter...I get the "Press Enter to Continue" i hit enter again and that is when i start seeing the config file...that is it really...not for sure why the script is not working 😢

  • Cathy Shehorn (Customer)

    @Mike Rockwell (Progress Software)​ , I know this has been a few months...but i have been working on this and i think this will work if i could get one more command in the script...

     

    after the "show run-config" the WLC has a prompt that says "Press Enter to continue.."

    I have tried several commands, but nothing I try works...how would you get around this?

     

    thanks in advance

     

  • Mike Rockwell (Progress Software)

    You could try putting a '@Read "Press Enter to Continue"' followed on the next line "@write $(CommandTerminator)"

     

    The CommandTerminator will send an enter.

  • Andrew Dolan (Progress Software)

    Hi Everyone

     

    The following task script has been tested successfully on a Cisco WLC 2500 series and a 3500 series

     

    @connect "login as: "

    @write $(LoginTerminator)

     

    @read "User: "

    @write "$(Settings.UserName)"

    @write $(LoginTerminator)

     

    @read "Password:"

    @write "$(Settings.Password)"

    @write $(LoginTerminator)

     

    #- @enable

     

    # for cisco WLC

    [-] config paging disable

     

    [running-confg, trim-before=/(V|v)ersion/, remove-lines="ntp clock-period"] show run-config { "Press Enter to continue...", $(CommandTerminator) }

     

    @logout