Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解决普通用户sudo时出现/usr/bin/sudo must be owned by uid 0 and have the setuid bit set #202

Open
yaogengzhu opened this issue Jan 22, 2024 · 0 comments

Comments

@yaogengzhu
Copy link
Owner

一:因为之前误操作使用sudo chmod -R 777 /usr命令修改了usr文件的所有者导致了此问题;

二:网上说需要进入recovery mode,经过自己的测试是不需要的;

三:步骤(只需登录到普通模式下即可)

1.su - root切换为root用户;

2.执行chown root:root /usr/bin/sudo

3.执行chmod 4755 /usr/bin/sudo

4.reboot后普通用户就又可以用sudo了;

【文章地址】https://www.cnblogs.com/silentdoer/p/8946946.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant