Solution after sudo/su is ruined
Table for linux user/group permission format .
The command “sudo chmod -R 777 /usr” ruined /usr/bin/sudo and /usr/bin/su
After ruined, when “sudo …” is executed, error occurs like
$ sudo
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
or
$ su
Password:
su: Authentication failure
According to the hints of error, this problem is solved by rebooting computer into a chroot mode, and execute following command
# chmod 4755 /usr/bin/sudo
# chown root:root /usr/bin/sudo # this makes ‘sudo’ owned by root (uid=0)
# chmod u+s /usr/bin/sudo # this set the ‘setuid’ bit, which is the third character in first triad
Explaination of setuid:
setuid and setgid (short for “set user ID upon execution” and “set group ID upon execution”, respectively)[1] are Unix access rights flags that allow users to run anexecutable with the permissions of the executable’s owner or group respectively and to change behaviour in directories. They are often used to allow users on a computer system to run programs with temporarily elevated privileges in order to perform a specific task. While the assumed user id or group id privileges provided are not always elevated, at a minimum they are specific.
Calendar
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Recent Blogs
- Solution after sudo/su is ruined
- 韩寒谈姑娘
- MATLAB error: libstdc++.so: version `GLIBCXX_3.4.15′ not found
- Two basic probabilistic proofs[zz]
- Debugging in Python[zz]
- Remote Linux Server in X11 mode from Windows
- Instructions for Installing RPM Files Using Alien [zz]
- Efficient Annotator
- std::min and std::max [zz]
- 分享一篇很有启发性的文章
Tag Cloud
Boosted Trees cases computer vision cvpr CVPR2011 Debug fatal error C1900 Feifei Li Free book GLIBCXX_3.4.15 gui Il mismatch between 'P1' version '20080116' Lasso LaTeX Letter library libstdc++ link error linux machine learning matlab matrices multiline equations paper pattern recognition permission Python Research setuid Stanford statistical learning SVM TeX Typesetting VS2008 万事开头难 创业之初 吃饭 大鸟 娃娃雪糕 改行换业 数据传递 新闻 无印良品 日本工艺 猎食 统计学习 青蛙 食堂Categories
Monthly Categorized Blogs
- May 2014 (1)
- May 2013 (2)
- February 2013 (1)
- November 2012 (1)
- October 2012 (1)
- February 2012 (3)
- December 2011 (2)
- November 2011 (2)
- October 2011 (1)
- September 2011 (1)
- August 2011 (2)
- July 2011 (3)
- June 2011 (13)
- April 2011 (3)
- March 2011 (4)
- February 2011 (3)
- January 2011 (5)
- November 2010 (9)
- October 2010 (3)
- April 2010 (6)