V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
ifconfig
V2EX  ›  问与答

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

  •  
  •   ifconfig · 2016-04-12 11:59:30 +08:00 · 2292 次点击
    这是一个创建于 2951 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

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

    重要的事情说三遍。。。
    ifconfig
        16
    ifconfig  
    OP
       2016-04-12 12:32:25 +08:00
    @gamexg @ayang23 @gxustudent @lxy42 @9hills

    谢谢各位提醒,由于对 Linux 不熟悉,导致这次错误,会深刻反省。
    解决办法:利用同事的电脑顺利修改 /etc/passwd , 改成 /bin/bash 。
    给后人提醒,结贴~~~
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5601 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 06:48 · PVG 14:48 · LAX 23:48 · JFK 02:48
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.