<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post/1497/</link>
<title><![CDATA[sudo -s 但保留当前工作目录,sudo -s 的问题：** is not in the sudoers file.  This incident will be reported.]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Tue, 16 Dec 2008 08:03:48 +0000</pubDate> 
<guid>http://jackxiang.com/post/1497/</guid> 
<description>
<![CDATA[ 
	实践OK，您是否需要模拟初始登录，您可以使用它sudo -s来获取root shell。<br/>来自：<a href="https://qa.1r1g.cn/serverfault/ask/25709631/" target="_blank">https://qa.1r1g.cn/serverfault/ask/25709631/</a><br/><br/><br/> 首先，提升用户至root<br/><br/>#su - （注意后面的-）<br/><br/>2、添加文件写权限。<br/><br/>chmod u+w /etc/sudoers (注：linux下)<br/><br/>chmod u+w /usr/local/etc/sudoers (注:FreeBSD下)<br/><br/>3、添加下面这一行至上述文件<br/><br/>username&nbsp;&nbsp;ALL=(ALL)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ALL(注：linux下)<br/><br/>username ALL=(ALL) SETENV: ALL(注:FreeBSD下)<br/><br/>我的FreeBSD：<br/><div class="code">xiangdong2 ALL=(ALL) SETENV: ALL</div><br/><br/>4、保存并退出<br/><br/>5、取消文件写权限<br/>否则出现：sudo: /usr/local/etc/sudoers is mode 0640, should be 0440&nbsp;&nbsp;(注:FreeBSD下)<br/><br/>chmod u-w /etc/sudoers (注：linux下)<br/><br/>chmod u-w /usr/local/etc/sudoers (注:FreeBSD下)<br/><br/>好了，这样就可以了。（最好重新登陆改账号！）<br/>PS：<br/>多谢那位兄弟的提醒。。。
]]>
</description>
</item><item>
<link>http://jackxiang.com/post/1497/#blogcomment51626</link>
<title><![CDATA[[评论] sudo -s 但保留当前工作目录,sudo -s 的问题：** is not in the sudoers file.  This incident will be reported.]]></title> 
<author>Thx &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Mon, 09 Aug 2010 11:02:07 +0000</pubDate> 
<guid>http://jackxiang.com/post/1497/#blogcomment51626</guid> 
<description>
<![CDATA[ 
	指出一个小错误<br/><br/>freebsd两个chmod命令错了<br/><br/>chomd应该改为chmod
]]>
</description>
</item><item>
<link>http://jackxiang.com/post/1497/#blogcomment51628</link>
<title><![CDATA[[评论] sudo -s 但保留当前工作目录,sudo -s 的问题：** is not in the sudoers file.  This incident will be reported.]]></title> 
<author>root &lt;admin@yourname.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Mon, 09 Aug 2010 13:16:25 +0000</pubDate> 
<guid>http://jackxiang.com/post/1497/#blogcomment51628</guid> 
<description>
<![CDATA[ 
	修改了。多谢。
]]>
</description>
</item>
</channel>
</rss>