sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
2016-05-31 11:32
711 查看
遇到这个问题说明当前用户没有sudo执行权限。
赋予sudo执行权限需要在root的模式下执行,系统默认禁用root账号,如果你的系统没有激活root,即无法切换到root账号,在使用su root命令时会报以下错误:
su:Authentication failure
这个时候我们可以用以下方式激活root:
ubuntu命令行->reboot重启->按esc进入->选择Advanced options for Ubuntu->选择recovery mode->选择root命令行模式
因为recovery模式默认是以只读模式挂载,所以我们要重新挂载切换到读写模式:
mount -o remount,rw /
mount --all
然后我们可以赋予sudo的执行权限:
chown root:root /usr/bin/sudo
chmod 4755 /usr/bin/sudo
然后重启系统:
reboot
赋予sudo执行权限需要在root的模式下执行,系统默认禁用root账号,如果你的系统没有激活root,即无法切换到root账号,在使用su root命令时会报以下错误:
su:Authentication failure
这个时候我们可以用以下方式激活root:
ubuntu命令行->reboot重启->按esc进入->选择Advanced options for Ubuntu->选择recovery mode->选择root命令行模式
因为recovery模式默认是以只读模式挂载,所以我们要重新挂载切换到读写模式:
mount -o remount,rw /
mount --all
然后我们可以赋予sudo的执行权限:
chown root:root /usr/bin/sudo
chmod 4755 /usr/bin/sudo
然后重启系统:
reboot
相关文章推荐
- Ubuntu 默认壁纸历代记
- Ubuntu Remix Cinnamon 20.04 评测:Ubuntu 与 Cinnamon 的完美融合
- Linux socket 初步
- 关于Ubuntu 11.10启动提示waiting for the network configuration的问题
- 在 Ubuntu 桌面中使用文件和文件夹
- Linux Kernel 4.0 RC5 发布!
- linux lsof详解
- linux 文件权限
- Linux 执行数学运算
- 10 篇对初学者和专家都有用的 Linux 命令教程
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- ubuntu下chrome无法同步问题解决
- 运维入门
- 运维提升
- Linux 自检和 SystemTap
- Ubuntu Linux使用体验