惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
B
Blog
Last Week in AI
Last Week in AI
Jina AI
Jina AI
WordPress大学
WordPress大学
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
宝玉的分享
宝玉的分享
T
Tailwind CSS Blog
P
Proofpoint News Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
Google DeepMind News
Google DeepMind News
U
Unit 42
雷峰网
雷峰网
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs
美团技术团队
Y
Y Combinator Blog
腾讯CDC
B
Blog RSS Feed
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements

阿豪运维笔记

DedeCMS后台部分功能打开空白如何排查修复 如何通过Navicat for MySQL导出Mysql数据库为SQL格式备份文件 如何通过Navicat for MySQL导入SQL备份文件 Win11系统如何通过CMD命令行窗口批量关闭相同进程 Win10系统如何通过CMD命令行窗口批量关闭相同进程 Win7系统如何通过CMD命令行窗口批量关闭相同进程 Win10系统中Windows 资源管理器是什么进程为啥重启下这个进程界面就正常了 Win7系统中explorer.exe是什么进程为啥重启下这个进程桌面显示就正常了 轻松搞定Windows系统自定义安装日期图文教程 Windows2025系统如何设置指定时间定时自动重启系统图文教程 Windows2022系统如何设置指定时间定时自动重启系统图文教程 Windows2019系统如何设置指定时间定时自动重启系统图文教程 Windows2016系统如何设置指定时间定时自动重启系统图文教程 Windows2012系统如何设置指定时间定时自动重启系统图文教程 OpenSUSE 16如何安装Linux Web可视化管理工具Cockpit Fedora 41如何安装Linux Web可视化管理工具Cockpit Fedora 40如何安装Linux Web可视化管理工具Cockpit Debian13如何安装Linux Web可视化管理工具Cockpit Debian12如何安装Linux Web可视化管理工具Cockpit Ubuntu24如何安装Linux Web可视化管理工具Cockpit Ubuntu22如何安装Linux Web可视化管理工具Cockpit Alibaba Cloud Linux 4如何安装Linux Web可视化管理工具Cockpit Alibaba Cloud Linux 3如何安装Linux Web可视化管理工具Cockpit Rocky Linux 10如何安装Linux Web可视化管理工具Cockpit
解决普通用户使用su命令切换root用户时提示su Authentication...
阿豪运维笔记 · 2026-05-18 · via 阿豪运维笔记

Linux系统中创建的普通用户使用su命令切换root用户时提示su: Authentication failure错误

image.png

通过root用户执行cat /var/log/secure查看secure日志,显示如下错误信息。

May 14 17:19:08 localhost unix_chkpwd[1682]: check pass; user unknown

May 14 17:19:10 localhost unix_chkpwd[1683]: check pass; user unknown

May 14 17:19:10 localhost unix_chkpwd[1683]: password check failed for user (root)

May 14 17:19:10 localhost su: pam_unix(su:auth): authentication failure; logname=putong uid=1000 euid=1000 tty=pts/1 ruser=putong rhost=  user=root

May 14 17:19:10 localhost su: pam_succeed_if(su:auth): requirement "uid >= 1000" not met by user "root"

image.png

出现这个报错可能是因为/bin/su命令文件缺少s权限,导致普通用户无法使用su命令切换root用户

解决办法

1、使用root用户登录Linux系统

2、执行如下命令,查看/bin/su文件权限

ls -l /bin/su

返回结果如下所示,说明/bin/su命令文件缺少s权限

image.png

3、执行如下命令,为/bin/su文件添加s权限

chmod u+s /bin/su

4、重新在普通用户下使用su命令切换root用户正常可以切换登入成功