5

Ubuntu输入su认证失败的解决方法

 1 year ago
source link: https://hugo.111520.xyz/posts/2023-05-10-ubuntu-su/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

linux 的权限和目录简述

linux 系统是用户权限管理非常明确,目录结构是一个根目录的目录树。每个文件有所有者 u,所在组 g,其他组 o,不同组对文件处理权限有读 r 写 w 执行 x。

/
├── bin -> usr/bin
├── boot
├── cdrom
├── dev
├── etc
├── home  #【用户在此目录下】
├── lib -> usr/lib
├── lib32 -> usr/lib32
├── lib64 -> usr/lib64
├── libx32 -> usr/libx32
├── lost+found
├── media
├── mnt
├── opt
├── proc
├── root
├── run
├── sbin -> usr/sbin
├── snap
├── srv
├── sys
├── tmp
├── usr
└── var

su 认证失败

Ubuntu 安装时默认创建的是普通账户,所有账户位于 home 目录下,每个账户只对自己及以下的文件夹有所有权限,超级管理员 root 默认是锁定的。

因此在终端中如果直接操作 home 外的其他目录会提示权限不够,输入 su 切换,输入密码会提示认证失败,此时需要先开启超级管理员。

  1. 终端输入 sudo passwd
  2. 输入系统安装时设置的密码
  3. 输入超管 root 的密码,重复两次
  4. 完成,此时已经开启 root 账号
关注一下有惊喜
wxqr.png 公众号
赞赏支持
wechatpay.png 微信打赏 alipay.png 支付宝打赏

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK