How to Recover a Password for a NetScaler Appliance

At times, you might need to recover the password for a NetScaler appliance if the user of the appliance has forgotten the same. To recover the password for the NetScaler appliance, complete the following procedure:

  1. Attach a console cable to the Serial Console (9600 baud, 8 bits, 1 stop bit, No parity) of the NetScaler appliance.
  2. Restart the NetScaler appliance.
  3. Press any of the following keys, as prompted:
    Press Spacebar when the following message is displayed:
    Hit [Enter] to boot immediately, or any other key for command prompt Booting [kernel] in 10 seconds
    Press Ctrl and C keys simultaneously when the following message is displayed:
    Press [Ctrl-C] for command prompt, or any other key to boot immediately.
    Booting [kernel] in 2 seconds…
  1. To start the appliance kernel on a single user mode, enter the following command:
    boot –sNote: If boot -s does not work, then try reboot — -s and appliance will reboot in single user mode.
  1. Press Enter when the following message is displayed:
    Enter full pathname of shell or RETURN for /bin/sh:Note: Notice that the prompt of the appliance changes to \u@\h\$.
  1. Run the following command to check the disk consistency:
  1. Run the following command to display the mounted partitions:
    df
  1. Run the following command to mount the flash drive:
    \u@\h\$ /sbin/mount /dev/ad0s1a /flashIf the preceding command fails to mount the flash drive, then run the following command to create the flash directory and then run the preceding command again to mount the drive:\u@\h\$ mkdir /flash
  1. Run the following command to change to the nsconfig directory:
    \u@\h\$ cd /flash/nsconfig
  1. Run the following set of commands to rewrite the ns.conf file and remove the set of system commands defaulting to the nsroot user:
    a. Run the following command to create a new configuration file that does not have commands defaulting to the nsroot user:
    \u@\h\$ grep –v “set system user nsroot” ns.conf > new.conf

    b. Run a command similar to the following command to make a backup of the existing configuration file:
    \u@\h\$ mv ns.conf old.ns.conf

    c. Run the following command to rename the new.conf file to ns.conf:
    \u@\h\$ mv new.conf ns.conf
  2. Run the following command to restart the appliance:
    reboot
  1. Log in to the appliance by using the default nsroot user credentials.
  2. Run the following command to reset the nsroot user password of your choice:
    > set system user nsroot <New_Password>


2 Responses to “How to Recover a Password for a NetScaler Appliance”

  • sagar says:

    Hello This didn’t work on my netscalar, I tried many times. When I hit enter after boot -s its entering into \u@ promt and its not \u@\h\$. Do you think its the problem ?

  • Ammy says:

    I am having exactly the same problem, boot -s ends up in \u@ prompt! Don’t know how to solve it.

    If you know the solution, kindly respond on ammy.rd@gmail.com


Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>