wex
V2EX  ›  问与答

乌班图被我 passwd -l 了,怎么办?

  •  
  •   wex · Jan 11, 2016 · 3038 views
    This topic created in 3793 days ago, the information mentioned may be changed or developed.

    我有俩问题,其中一个就是标题那个,我在 root 下执行了 passwd -l user 后,现在打不开了,提示密码错误。
    因为我看了一下文档,说是锁定用户,但是不锁定其他 SSH ,我就用 Xsheel 登陆不上去

    第二个就是怎么默认使用 root 登录,而不用普通用户登录,因为我在学习,不牵扯安全什么的

    8 replies    2016-01-12 12:25:34 +08:00
    imgalaxy
        1
    imgalaxy  
       Jan 11, 2016
    keyword: Single-User mode
    qihboy
        2
    qihboy  
       Jan 12, 2016
    默认 root 登录的话,在~/.ssh/config 文件中加
    Host xxxx.com
    User root
    Port 22
    skydiver
        3
    skydiver  
       Jan 12, 2016 via Android
    @qihboy 直接命令行 ssh root@xxxx 不就可以了,改配置多麻烦
    ryd994
        4
    ryd994  
       Jan 12, 2016
    ssh 不锁公钥验证,但密码还是锁的
    进 single user ,不用登录就是 root
    或者 livecd , U 盘启动,进去把 /etc/passwd 里的!去了
    qihboy
        5
    qihboy  
       Jan 12, 2016
    @skydiver 改配置一劳永逸,输入每次都得输,尤其是在端口非 22 的情况下
    skydiver
        6
    skydiver  
       Jan 12, 2016
    @qihboy 楼主本来就是一次性任务
    skydiver
        7
    skydiver  
       Jan 12, 2016
    @qihboy 好吧理解错了,第二个需求和第一个没关系,我以为只是一次性登进去改配置呢……
    wex
        8
    wex  
    OP
       Jan 12, 2016 via Android
    谢谢大家,问题解决了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5762 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 96821589 · 48ms · UTC 01:41 · PVG 09:41 · LAX 18:41 · JFK 21:41
    ♥ Do have faith in what you're doing.