Netscaler重置密码的方法
2017-02-16 12:34
316 查看
有时候我们会碰到忘记Netscaler的密码,或接手别人的设备而不知道密码的情况。在这种情况下能看到但进不去,那感觉真是酸爽!如何初始化Netscaler的密码,及时启用手上的设备就很重要了。
用console线连接到Netscaler,按启动按钮后会看到以下内容,按照如下提示操作即可
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...
4. To start the appliance kernel on a single user mode, enter the following command:
boot –s
Note: If boot -s does not work, then try reboot -- -s and appliance will reboot in single user mode.
5. 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\$.
6. Run the following command to check the disk consistency:
\u@\h\$ /sbin/fsck /dev/ad0s1a(此命令一定要先执行,否则不能挂载/flash)
Note: Refer to the Knowledge Center article CTX121853 – Device Names Assigned to Hard Disk in Various Models of the Citrix NetScaler Appliance to verify the device name assigned to the hard disk of the appliance model and replace ad0s1a in the preceding command with the appropriate device name.
7. Run the following command to display the mounted partitions:
df
8. Run the following command to mount the flash drive:
\u@\h\$ /sbin/mount /dev/ad0s1a /flash( 一定要把flash挂上,否则看不到ns.conf)
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:
\u@\h\$ mkdir /flash(如果有/flash可以不执行这步)
9. Run the following command to change to the nsconfig directory:
\u@\h\$ cd /flash/nsconfig
10. 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(提取除nsroot用户以外的其他配置到新文件)
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(用没有nsroot的配置启动)
11. Run the following command to restart the appliance:
reboot
12. Log in to the appliance by using the default nsroot user credentials.
此时nsroot的密码为初始化的密码,直接输入nsroot登陆即可
13. Run the following command to reset the nsroot user password of your choice:
> set system user nsroot <New_Password>重新输入密码
用console线连接到Netscaler,按启动按钮后会看到以下内容,按照如下提示操作即可
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...
4. To start the appliance kernel on a single user mode, enter the following command:
boot –s
Note: If boot -s does not work, then try reboot -- -s and appliance will reboot in single user mode.
5. 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\$.
6. Run the following command to check the disk consistency:
\u@\h\$ /sbin/fsck /dev/ad0s1a(此命令一定要先执行,否则不能挂载/flash)
Note: Refer to the Knowledge Center article CTX121853 – Device Names Assigned to Hard Disk in Various Models of the Citrix NetScaler Appliance to verify the device name assigned to the hard disk of the appliance model and replace ad0s1a in the preceding command with the appropriate device name.
7. Run the following command to display the mounted partitions:
df
8. Run the following command to mount the flash drive:
\u@\h\$ /sbin/mount /dev/ad0s1a /flash( 一定要把flash挂上,否则看不到ns.conf)
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:
\u@\h\$ mkdir /flash(如果有/flash可以不执行这步)
9. Run the following command to change to the nsconfig directory:
\u@\h\$ cd /flash/nsconfig
10. 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(提取除nsroot用户以外的其他配置到新文件)
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(用没有nsroot的配置启动)
11. Run the following command to restart the appliance:
reboot
12. Log in to the appliance by using the default nsroot user credentials.
此时nsroot的密码为初始化的密码,直接输入nsroot登陆即可
13. Run the following command to reset the nsroot user password of your choice:
> set system user nsroot <New_Password>重新输入密码
相关文章推荐
- 示例详解Laravel重置密码代码重构
- 重置动易(SiteWeaver 6.5)的管理员密码的代码
- MySQL密码忘了怎么办?MySQL重置root密码方法
- N点主机管理系统重置密码方法(在线修改密码)
- MySQL密码忘了怎么办?MySQL重置root密码方法
- 示例详解Laravel重置密码代码重构
- 使用UC_KEY可重置论坛(除uid为1的)任意用户的密码
- NetScaler端口开放
- NetscalerSSL证书的导入和link
- StoreFront与NetScaler集成配置
- Netscaler 10.5 VPX与XenApp XenDesktop 集成配置系列之一基本网络配置
- Netscaler 10.5 VPX与XenApp XenDesktop 集成配置系列之二申请域根证书颁发机构签发的服务器证书
- 深入理解Netscaler INat
- NetScaler GSLB static proximity 静态数据库 排错“N“板斧
- WampServer 修改MySQL密码和重置MySQL密码
- MAC下安装MySql遇到的问题
- Windows Server 2012 R2安装MySQL 5.7
- 重置mysql的root密码
- 程序员生活---行李箱密码解锁
- Mac系统重置MySQL的 root密码