账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    ubuntu 密码问题
    36
    0

    输入 ssh localhost

    如下提示,但是我输入我的root密码不起作用,还是拒绝,请问应该输入什么密码?

                            ****USAGE WARNING****
    

    This is a private computer system. This computer system, including all
    related equipment, networks, and network devices (specifically including
    Internet access) are provided only for authorized use. This computer system
    may be monitored for all lawful purposes, including to ensure that its use
    is authorized, for management of the system, to facilitate protection against
    unauthorized access, and to verify security procedures, survivability, and
    operational security. Monitoring includes active attacks by authorized entities
    to test or verify the security of this system. During monitoring, information
    may be examined, recorded, copied and used for authorized purposes. All
    information, including personal information, placed or sent over this system
    may be monitored.

    Use of this computer system, authorized or unauthorized, constitutes consent
    to monitoring of this system. Unauthorized use may subject you to criminal
    prosecution. Evidence of unauthorized use collected during monitoring may be
    used for administrative, criminal, or other adverse action. Use of this system
    constitutes consent to monitoring for these purposes.

    xxxxx@localhost's password:

    0
    打赏
    收藏
    点击回答
    您的回答被采纳后将获得:提问者悬赏的 10 元积分
        全部回答
    • 0
    • 筱仲马 普通会员 1楼

      在Ubuntu系统中,关于密码问题,你可能会遇到以下几种情况:

      1. 忘记密码:
      2. 如果你忘记了Ubuntu的登录密码,可以在开机时进入恢复模式,然后通过命令行重置密码。步骤如下:

        • 重启电脑,在GRUB引导菜单出现时,选择"Advanced options for Ubuntu",然后选择" Recovery mode"。
        • 在恢复模式菜单中,选择"Drop to root shell prompt"。
        • 进入命令行后,执行以下命令以获得超级用户权限并重置密码(将username替换为你的用户名): mount -o remount,rw / passwd username
        • 按提示输入新密码并确认。
      3. 修改密码:

      4. 当你已经登录系统,可以使用passwd命令修改当前用户的密码: passwd
      5. 系统会提示你输入当前密码(如果已设置),然后输入新的密码和再次确认。

      6. 设置密钥登录或无密码sudo:

      7. Ubuntu允许用户通过SSH密钥对进行无密码登录,或者在sudoers文件中设置特定用户无需密码即可使用sudo。

        • 对于SSH密钥登录,你需要生成密钥对(id_rsa和id_rsa.pub),并将公钥(id_rsa.pub)添加到远程主机的~/.ssh/authorized_keys文件中。
        • 对于无密码sudo,使用visudo编辑/etc/sudoers文件,添加类似username ALL=(ALL) NOPASSWD:ALL的行(请谨慎操作,这会带来安全风险)。
      8. 密码过期策略:

      9. Ubuntu默认有密码过期策略,管理员可以配置密码有效期、过期前警告等。这些设置通常在/etc/login.defs和/etc/pam.d/common-password文件中进行。

      如果你有更具体的问题,请提供详细信息,我会根据实际情况给予帮助。

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部