资讯详情

单用户模式下执行 chroot: failed to run command ‘/bin/bash’: No such file or directory

使用帐户密码登录服务器时,总是提示拒绝访问:

Access denied root@10.11.17.100's password: 

第一个想法是先重置密码,然后进入单用户模式执行chroot /sysroot以下报错:

switch_root:/# chroot /sysroot chroot: failed to run command ‘/bin/bash’: No such file or directory 

提示可以看到,因为没有找到 /bin/bash,于是看下sysroot之中是否有/bin/bash

switch_root:/# ls /sysroot/bin/bash ls: cannot access /sysroot/bin/bash: No such file or directory 

解决版本:

既然没有就直接复制一个过去,执行如下命令:

switch_root:/# cp /bin/bash /sysroot/bin/bash switch_root:/# chroot /sysroot sh-4.2# #已经正常 

标签: 国产atca电源连接器

锐单商城拥有海量元器件数据手册IC替代型号,打造 电子元器件IC百科大全!

锐单商城 - 一站式电子元器件采购平台