Calvin's Tech Space

成于坚忍,毁于浮躁

   :: 首页 :: 联系 :: 聚合  :: 管理
起因:
新建了一个用户,运行sudo时提示calvin is not in the sudoers file。于是:
1.尝试把calvin用户加入到sudoers文件中,具体位置是/etc/sudoers。
  sudo chmod u+w /etc/sudoers,出现错误:
sudo:/etc/sudoers is mode 0640, should be 0440
2.尝试用su命令,
su - root
Password:
su: Authentication failure
Sorry.
此时已经无法再继续,于是:
重启进入recovery模式:
root@XXX:~#sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully.
3.退出,一切恢复正常。

参考:http://hi.baidu.com/shirdrn/blog/item/3b2d17cabc01118cc8176862.html
posted on 2010-01-25 00:47 calvin 阅读(2561) 评论(0)  编辑  收藏 所属分类: Linux

只有注册用户登录后才能发表评论。


网站导航: