How to reset root administrator (nsroot) password 编辑
The Citrix ADC root administrator (nsroot
) account provides complete access to all ADC features. So, to preserve security, the administrative account must be used only if necessary.
As an admin, the recommendation is to change your password. If you forget your password, you must first reset to the default one and then change it to a new password.
As a nsroot
administrator, to reset your password, you must log on to your appliance and change the password. However, if you do not remember the password, you can reboot the appliance in single user mode. Mount the file system in read/write mode, and then remove the Citrix ADC entry from the ns.conf file. As a final step, reboot and log on to your appliance with the default one and then set a new password.
Complete the following steps to reset your root administrator password:
Connect a computer to the console port of the Citrix ADC and log on.
Note
You cannot log on by using SSH to do this procedure; you must connect directly to the appliance.
- Reboot the Citrix ADC.
Press CTRL+C when the following message appears:
Press [Ctrl-C] for command prompt, or any other key to boot immediately.
Booting [kernel] in # seconds.
Note
In an Azure serial console, the Citrix ADC appliance does not support single boot until the ADC appliance is booted.
Run the following command to start the Citrix ADC in a single user mode:
boot -s
After the appliance boots, it displays the following message:
Enter full path name of shell or
RETURN for /bin/sh:
Press ENTER to display the # prompt, and type the following commands to mount the file systems:
Run the following command to check the disk consistency:
fsck_ufs /dev/ad0s1a
Note
Your flash drive has a specific device name depending on your Citrix ADC. Run the following command at the ADC CLI and copy the name ending with “1a.”
gpart show -p
For example,
- Access the dev directory and enter ‘ls’ to check the drive details.
Run the following command to display the mounted partitions:
df
Note
If the flash partition is not listed, you must mount it manually.
Run the following command to mount the flash drive:
mount /dev/ad0s1a /flash
Run the following command to change to the
nsconfig
directory:cd /flash/nsconfig
- Run the following commands to rewrite the ns.conf file and remove the set of system commands defaulting to the admin:
Run the following command to create a configuration file that does not have commands defaulting to the administrator:
grep –v “set system user nsroot” ns.conf > new.conf
Run the following command to make a backup of the existing configuration file:
mv ns.conf old.ns.conf
Run the following command to rename the new.conf file to ns.conf:
mv new.conf ns.conf
Run the following command to reboot the Citrix ADC:
reboot
- Log on using the default administrator credentials.
Run the following command to reset the administrator password:
set system user nsroot <New_Password>
Note
To use the “?” character in a password string, precede this character with the
\
character.For example,
yourexamplepasswd?
is set for the administrator account after you perform the following operation:> set system user nsroot yourexamplepasswd\?
Note
For resetting a forgotten (
nsroot
) password in a high availability setup, Citrix recommends you to shut down the peer node. If the peer node is active, the password is overwritten, as the config sync is triggered when the node comes up after reboot.
Also, read Citrix article, CTX224027 to know how secure SSH access to Citrix ADC appliance works.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论