莫名其妙的ubuntu就启动不了了,谁能提供一下12.04的/etc/sudoers文件

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
头像
NewUserFF
帖子: 413
注册时间: 2010-11-19 22:55

莫名其妙的ubuntu就启动不了了,谁能提供一下12.04的/etc/sudoers文件

#1

帖子 NewUserFF » 2012-08-22 15:46

ubuntu12.04,能进入登录画面,就是死活登不进去,登录的时候屏幕一闪(1秒左右),有几行代码显示出来(持续1秒,仔细看了看,没有什么错误显示,都是些最基本的登录信息,也就是说,没显示什么错误),然后就又闪回去了,登陆界面的界面选项不能用,只显示back,没有unity, unity 2D, gnome等界面信息,不能调音量,不能关机,这些选项全部空白,登录文本界面,输入sudo....这样的命令,显示/usr/bin/python Permission denied :em20

由于关机前修改过/etc/sudoers文件,强烈怀疑是这个文件引起的,谁可以提供这个文件,这个文件不长,贴在下面就行了,我比对一下文件内容对不对,十分感谢!
头像
TeliuTe
论坛版主
帖子: 7675
注册时间: 2007-11-25 13:29
系统: 16/18/20/w7
来自: 新疆博乐
联系:

Re: 莫名其妙的ubuntu就启动不了了,谁能提供一下12.04的/etc/sudoers文件

#2

帖子 TeliuTe » 2012-08-22 16:17

代码: 全选

teliute@1-Teacher:~$ sudo cat /etc/sudoers
[sudo] password for teliute: 
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults	env_reset
Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root	ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo	ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

头像
NewUserFF
帖子: 413
注册时间: 2010-11-19 22:55

Re: 莫名其妙的ubuntu就启动不了了,谁能提供一下12.04的/etc/sudoers文件

#3

帖子 NewUserFF » 2012-08-22 18:28

居然一样,那应该不是这里除了问题,现在普通用户一输入sudo就出问题,显示permission denied,到底哪里出问题了
JiangHui
论坛版主
帖子: 21308
注册时间: 2007-08-02 20:29
系统: 窓辺とうこ

Re: 莫名其妙的ubuntu就启动不了了,谁能提供一下12.04的/etc/sudoers文件

#4

帖子 JiangHui » 2012-08-22 18:31

文件权限丢了?
头像
NewUserFF
帖子: 413
注册时间: 2010-11-19 22:55

Re: 莫名其妙的ubuntu就启动不了了,谁能提供一下12.04的/etc/sudoers文件

#5

帖子 NewUserFF » 2012-08-22 19:16

google了一下,有个人跟我一样,他最后没解决,重装ubuntu了
头像
NewUserFF
帖子: 413
注册时间: 2010-11-19 22:55

Re: 莫名其妙的ubuntu就启动不了了,谁能提供一下12.04的/etc/sudoers文件

#6

帖子 NewUserFF » 2012-08-22 19:18

JiangHui 写了:文件权限丢了?
什么意思
头像
NewUserFF
帖子: 413
注册时间: 2010-11-19 22:55

Re: 莫名其妙的ubuntu就启动不了了,谁能提供一下12.04的/etc/sudoers文件

#7

帖子 NewUserFF » 2012-08-22 20:00

我用root账号登录成功了,可以肯定的是,我的普通用户的sudo权限丢失了,有人知道怎么找回来吗
头像
cuihao
帖子: 4793
注册时间: 2008-07-24 11:33
来自: 郑州
联系:

Re: 莫名其妙的ubuntu就启动不了了,谁能提供一下12.04的/etc/sudoers文件

#8

帖子 cuihao » 2012-08-22 20:02

你的用户还在sudo组么?
求人不如求它仨: 天蓝的Wiki 屎黄的Wiki 绿
Site: CUIHAO.TK    Twitter: @cuihaoleo
Machine: Athlon64 X2 5200+ / 2x2GB DDR2-800 / GeForce GTS 450
AD: ~まだ見ぬ誰かの笑顔のために~
头像
NewUserFF
帖子: 413
注册时间: 2010-11-19 22:55

Re: 莫名其妙的ubuntu就启动不了了,谁能提供一下12.04的/etc/sudoers文件

#9

帖子 NewUserFF » 2012-08-22 20:12

在sudo组,这究竟是什么问题,真是莫名其妙,还能是哪里出了问题呢
上次由 NewUserFF 在 2012-08-22 20:25,总共编辑 1 次。
头像
NewUserFF
帖子: 413
注册时间: 2010-11-19 22:55

Re: 莫名其妙的ubuntu就启动不了了,谁能提供一下12.04的/etc/sudoers文件

#10

帖子 NewUserFF » 2012-08-22 20:13

重装了一遍sudo也没用,另外说一下,如果乱输的话也会显示permission denied,而且普通用户一登录,就会显示-bash: groups: command not found
上次由 NewUserFF 在 2012-08-22 20:49,总共编辑 2 次。
头像
NewUserFF
帖子: 413
注册时间: 2010-11-19 22:55

Re: 莫名其妙的ubuntu就启动不了了,谁能提供一下12.04的/etc/sudoers文件

#11

帖子 NewUserFF » 2012-08-22 20:14

cuihao 写了:你的用户还在sudo组么?
在sudo组

代码: 全选

id mycityofsky

代码: 全选

uid=1000(mycityofsky) gid=1000(mycityofsky) groups=1000(mycityofsky),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),109(lpadmin),124(sambashare)
头像
NewUserFF
帖子: 413
注册时间: 2010-11-19 22:55

Re: 莫名其妙的ubuntu就启动不了了,谁能提供一下12.04的/etc/sudoers文件

#12

帖子 NewUserFF » 2012-08-22 20:38

/etc/sudoer:

代码: 全选

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults	env_reset
Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root	ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo	ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
头像
careone
帖子: 839
注册时间: 2007-12-17 21:41

Re: 莫名其妙的ubuntu就启动不了了,谁能提供一下12.04的/etc/sudoers文件

#14

帖子 careone » 2012-08-23 18:13

注意这行:
你的设置

代码: 全选

root   ALL=(ALL:ALL) ALL
ubuntu 10.04 的原始设置

代码: 全选

# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults	env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root	ALL=(ALL) ALL

# Allow members of group sudo to execute any command after they have
# provided their password
# (Note that later entries override this, so you might need to move
# it further down)
%sudo ALL=(ALL) ALL
#
#includedir /etc/sudoers.d

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

代码: 全选

root	ALL=(ALL) ALL
可能你在括号里多了四个字符:
:ALL

建议比对用 meld 等专业比对程序,不要用眼睛去比对。
细节处很容易忽略

sudo apt-get install meld

sudo meld /etc/sudoers /etc/sudoers.my
魁拔不死,天下不宁。
魁拔既死,天下不平。
--------------
Careone <emacslocale^126.com>
https://sourceforge.net/projects/emacslocale/files/
头像
NewUserFF
帖子: 413
注册时间: 2010-11-19 22:55

Re: 莫名其妙的ubuntu就启动不了了,谁能提供一下12.04的/etc/sudoers文件

#15

帖子 NewUserFF » 2012-08-23 18:34

careone 写了:注意这行:
你的设置

代码: 全选

root   ALL=(ALL:ALL) ALL
ubuntu 10.04 的原始设置

代码: 全选

# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults	env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root	ALL=(ALL) ALL

# Allow members of group sudo to execute any command after they have
# provided their password
# (Note that later entries override this, so you might need to move
# it further down)
%sudo ALL=(ALL) ALL
#
#includedir /etc/sudoers.d

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

代码: 全选

root	ALL=(ALL) ALL
可能你在括号里多了四个字符:
:ALL

建议比对用 meld 等专业比对程序,不要用眼睛去比对。
细节处很容易忽略

sudo apt-get install meld

sudo meld /etc/sudoers /etc/sudoers.my
谢谢你的回复,可能是ubuntu改过了吧,你看前面一楼一人发过ubuntu 12.04的suoder文件,的确多了一个:ALL,应该不是这个文件,不过这个比对软件好像很有用,我拿别的文件看看
回复