ifconfig
V2EX  ›  问与答

linux 服务器卸载了 zsh 后不能连接了

  •  
  •   ifconfig · Apr 12, 2016 · 3199 views
    This topic created in 3858 days ago, the information mentioned may be changed or developed.

    1.通过 yum 安装的 zsh 2.执行 yum remove zsh 然后断开终端,就再也连不上了,提示密码错误 作死啊,这到底什么回事?自己的服务器都没事,死翘翘了

    16 replies  •  2016-04-12 12:32:25 +08:00
    lxy42
    lxy42
    Apr 12, 2016
    1
    login shell 的问题?
    9hills
    9hills
    Apr 12, 2016
    2
    你配置了 zsh 为 login shell ,然后。。。
    lxy42
    lxy42
    Apr 12, 2016
    3
    试试用别的用户名登录
    ifconfig
    ifconfig
    OP
    Apr 12, 2016
    4
    @lxy42 @9hills 我也觉得应该是这个问题,咋整?
    lxy42
    lxy42
    Apr 12, 2016
    5
    @ifconfig 试试登录 root 账户,如果你没有设置 root 账户的 login shell 为 zsh 的话。
    ifconfig
    ifconfig
    OP
    Apr 12, 2016❤️1
    6
    @lxy42 默认就是登陆 root 的,现在就是 root 可能设了 login shell 为 zsh 。。。。。
    lxy42
    lxy42
    Apr 12, 2016
    7
    @ifconfig 那别的用户呢?
    gamexg
    gamexg
    Apr 12, 2016
    8
    尝试换个其他用户。
    这个用户感觉是挂了, shell 应该不能远端更改,否则 nologin shell 就没用了。

    希望 linux 大牛详细解答下。
    ifconfig
    ifconfig
    OP
    Apr 12, 2016❤️1
    9
    @gamexg @lxy42 同事有一台电脑在我误操作前就用 root 登了进去,现在可以用它电脑看,现在应该是怎样的步骤?
    lxy42
    lxy42
    Apr 12, 2016
    10
    @ifconfig 😰手抖老是点到感谢, chsh 命令改变 shell
    gamexg
    gamexg
    Apr 12, 2016
    11
    vi /etc/passwd
    ayang23
    ayang23
    Apr 12, 2016
    12
    @ifconfig 修改 /etc/passwd 把 shell 改回 /bin/bash, 还有救
    jasontse
    jasontse
    Apr 12, 2016 via iPad
    13
    chsh
    gxustudent
    gxustudent
    Apr 12, 2016
    14
    细思极恐,这种情况肯定是有个人先把 bash 改成了 zsh ,你却把 zsh 删了,你和他什么仇什么怨?
    ferock
    ferock
    Apr 12, 2016
    15
    不要修改 root 的 bash
    不要修改 root 的 bash
    不要修改 root 的 bash

    重要的事情说三遍。。。
    ifconfig
    ifconfig
    OP
    Apr 12, 2016
    16
    @gamexg @ayang23 @gxustudent @lxy42 @9hills

    谢谢各位提醒,由于对 Linux 不熟悉,导致这次错误,会深刻反省。
    解决办法:利用同事的电脑顺利修改 /etc/passwd , 改成 /bin/bash 。
    给后人提醒,结贴~~~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4787 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 65ms · UTC 01:15 · PVG 09:15 · LAX 17:15 · JFK 20:15
    ♥ Do have faith in what you're doing.