思科 N9K 交换机密码恢复

目录

1. 命令行界面修改密码

2. 断电/重启恢复密码

* 从 FTP 加载镜像


修改 admin 密码有以下几种方式:

  1. 通过命令行界面,使用 admin 权限的用户名进行恢复;
  2. 对设备进行断电/重启设备恢复。

1. 命令行界面修改密码

1. 查看账户

switch# show user-account 
user:admin
        this user account has no expiry date
        roles:network-admin
user:dbgusr
        this user account has no expiry date
        roles:network-admin network-operator

2. 修改密码
switch(config)# username admin password cisco!123

3. 保存配置
switch(config)# copy running-config startup-config 

2. 断电/重启恢复密码

密码恢复操作仅会在本地用户数据库中更新管理员密码。只有启用了本地身份验证时,新密码才有效;对远程 AAA 身份认证不起作用。密码被恢复后,console 登录会启用本地身份验证,管理员用户能使用新密码 console 登录。

如果执行 “copy configuration-file startup-config” 后执行了 “fast-reload”或 “reload” ,而配置文件中未指定用户名,因而需要恢复密码的话,那么您将需要在下面的第 12 步中执行 “write erase”(擦除配置)操作。

1. 笔记本 console 连接到活动引擎,设备加电启动过程中 ctrl + c 或 ctrl + ] (必须使用美式键盘)进入 loader 模式。

2. 进入密码恢复模式之后,加载镜像,进入 boot 界面。

loader> cmdline recoverymode=1           
loader> boot n9000-dk9.x.x.x.bin         //加载镜像
Booting iash
Trying diskboot
 Filesystem type is ext2fs, partition type 0x83
Image valid
MD5Sum mismatch

INIT: Loading IGB driver ... Signature Envelope.(36)Invalid Tag in Signature Envelope
Installing SSE module ... done
Creating the sse device node ... done
Installing CCTRL driver for card_type 3 ...

Checking all filesystems.......
Installing SPROM driver ...
Installing default sprom values ...
 done.Configuring network ...
Installing psdev ...
Installing veobc ...
Installing OBFL driver ...
Starting portmap daemon...
creating NFS state directory: done
starting 8 nfsd kernel threads: done
starting mountd: done
starting statd: done
Loading system software
No system image is specified
INIT: Sending processes the TERM signal
INIT: Sending processes the KILL signal
Bad terminal type: "linux". Will assume vt100.
Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Copyright (c) 2002-2013, Cisco Systems, Inc. All
rights reserved.
The copyrights to certain works contained in this
software are owned by other third parties and used
and distributed under license. Certain components
of this software are licensed under the GNU General
Public License (GPL) version 2.0 or the GNU
Lesser General Public License (LGPL) Version 2.1.
A copy of each such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://www.opensource.org/licenses/lgpl-2.1.php

switch(boot)#

3. 配置用户名和密码并重新加载镜像。

switch(boot)# config terminal 
switch(boot)(config)# admin-password cisco!123
switch(boot)(config)# exit
switch(boot)# load-nxos

4. 如果配置了 SNMP 则 console 登陆后,重新设置一次密码(nxos 自动从用户密码衍生 SNMP 密码)

switch login: admin 
Password: cisco!123
switch(config)# username admin password cisco!123

* 从 FTP 加载镜像

设备引擎 bootflash 中没有对应 nxos 镜像,需要从 FTP 加载镜像的情况需提前设置静态路由。

loader> set ip 192.168.1.1 255.255.255.0    //配置设备 IP 和 子网
loader> set gw 192.168.1.254                //设置网关
loader> cmdline recoverymode=1
loader> boot tftp://10.1.1.1/tftpboot/n9000-dk9.3.8.bin
switch(boot)# init system
switch(boot)# init system


REF: Password Recovery Procedure for Cisco NX-OS - Cisco

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

m0_54931486

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值