How to recover/reset password for a NetScaler appliance

We should avoid HA failover due to reboot, so it is recommended to set STAY PRIMARY on primary node and STAY SECONDARY on secondary node.

To reset the nsroot password, you must boot the appliance into single user mode.

Connect the console cable to the Netscaler Serial Console (9600 baud, 8 bits, 1 stop bit, No parity) of the NetScaler appliance. In case of NetScaler VPX access NetScaler through vSphere console.

1. After connecting to the Netscaler Serial Console, restart the NetScaler appliance.

2. Press Ctrl+C keys simultaneously to Boot in kernel.

3. To start the appliance kernel on a single user mode, run boot -s. If boot -s does not work, then try reboot — -s.

4. Press ENTER key to display the # prompt, and run the following command to verify the /flash drive consistency:
$ /sbin/fsck /dev/ad0s1a

5. Run the following command to display the mounted partitions:
$ df

6. Check if /flash drive is created, then run the following command to mount the flash drive:
$ /sbin/mount /dev/ad0s1a /flash

If 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:
$ mkdir /flash

In case of NetScaler VPX on VMware, the disk uses SCSI emulation and the device name of the flash drive is da0s1a.

7. Run the following command to change to the nsconfig directory:
$ cd /flash/nsconfig

8. Create a new configuration file that does not have commands defaulting to the nsroot user:
$ grep –v “set system user nsroot” ns.conf > new.conf

9. Make a backup of the existing configuration file:
$ mv ns.conf old.ns.conf

10. Rename the “new.conf” file to “ns.conf”:
$ mv new.conf ns.conf

11. Run the following command to restart the appliance:
$ reboot

12. Log on to the appliance using the default nsroot user credentials (nsroot/nsroot).

13. Reset the nsroot user password of your choice:
$ set system user nsroot <New_Password>

Advertisement

About Murugan B Iyyappan

Working as a Consultant - Citrix solutions architect with 18 years of experience in the IT industry. Expertise in Citrix products and Windows platform.
This entry was posted in Citrix XenApp. Bookmark the permalink.