bloxHub

www.infoblox.com/community
Cisco Set User Password
Posted on September 05, 2007 | Last edited by pvogelsang on April 20, 2012
Filed in Command Scripts (CCS)
+1
0
-1
File name: cisco_set_user_passwd.ccs
File size: 1.99 KB

This script sets the password for a given username on all Cisco devices. The user will be prompted for a valid username and password when the script is executed. If an account does not already exist for the given username, one will be created.

 

Script:
    Example 1 - Cisco Set User Password

Script-Description:
    This script sets the password for a given username on all Cisco
    devices. The user will be prompted for a valid username and
    password when the script is executed. If an account does not
    already exist for the given username, one will be created.

    This example demonstrates the use of a simple action that is
    executed once on every appropriate device.

#-----------------------------------------------------------------------
#    The Script-Filter is used to indicate that the entire script
#    should only be executed for Cisco IOS devices.
#-----------------------------------------------------------------------
Script-Filter:
    $Vendor eq "Cisco" and $sysDescr like /IOS/

#-----------------------------------------------------------------------
#    Script-Variables are defined to allow the user to provide input
#    to the script. In this example, the user will be prompted to
#    enter a username and password prior to script execution. The
#    username is defined as type "word", which means any string
#    without whitespace can be entered. The password is defined as
#    type "password", which means any string can be entered, however
#    only stars will be displayed.
#
#    The "UserName" and "Password" fields define the GUI prompts
#    to be displayed to the user when the script is executed.
#-----------------------------------------------------------------------
Script-Variables:
    $username    word        "UserName"
    $password    password    "New Password"

########################################################################
Action:
    Set IOS User Password

Action-Description:
    This action is executed once for every device that matches the
    Script-Filter defined above.  It sets the password for the
    given user account and then saves the configuration.

Action-Commands:
    config terminal
    username $username password 0 $password
    exit
    write memory
########################################################################
 

Add comment

Log in or register to post comments

Welcome to bloxHub

Welcome to bloxHub, our community for users of Infoblox products. Most of our content can be viewed as a guest, but if you wish to contribute or join a conversation, you will need to log in. If you don't have a bloxHub account, we invite you to register an account and join us.

Follow us on Twitter

Follow us on Twitter at @bloxHub and we'll keep you notified of new content on the community as well as webinars and other items of interest to Infoblox users.