今天突然不能su到root了,root密码是正确的,但是就是显示密码错误
还有mount也不能在一般用户里用了,不管有没有设备,都说没有权限
到google上搜索了一番,发现了这样一段:
---------------------------
Try doing (note back-ticks not quotes)
$ ll `which mount`
it should report :
$ ll `which mount`
-rwsr-xr-x 1 root root 52788 Apr 17 16:54 /bin/mount
^
|
/
This means the mount program is setuid root. If your copy is not,
you will need to do a chmod u+s `which mount` while logged in as root.
This should fix it. If you still have problems, you could check the
permissions of your cdrom device in /dev, but I don't think this is the
problem.
-----------------------------
运行了一下chmod u+s /bin/*,结果就都好了
u+s代表什么意思呢?
还有mount也不能在一般用户里用了,不管有没有设备,都说没有权限
到google上搜索了一番,发现了这样一段:
---------------------------
Try doing (note back-ticks not quotes)
$ ll `which mount`
it should report :
$ ll `which mount`
-rwsr-xr-x 1 root root 52788 Apr 17 16:54 /bin/mount
^
|
/
This means the mount program is setuid root. If your copy is not,
you will need to do a chmod u+s `which mount` while logged in as root.
This should fix it. If you still have problems, you could check the
permissions of your cdrom device in /dev, but I don't think this is the
problem.
-----------------------------
运行了一下chmod u+s /bin/*,结果就都好了
u+s代表什么意思呢?
作者: cobranail 发布时间: 2004-11-24
给/bin/* 的拥有者增加可执行权限。
很多人可能都喜欢用chmod 755、644、777等赋予权限,其实还是用chmod ugo+rwx这样的形式比较直观。
u--拥有者
g--同组用户
o--其它用户
r--可读
w--可写
x--可执行
s--可执行(跟x差不多,我还不清楚两者的区别)
很多人可能都喜欢用chmod 755、644、777等赋予权限,其实还是用chmod ugo+rwx这样的形式比较直观。
u--拥有者
g--同组用户
o--其它用户
r--可读
w--可写
x--可执行
s--可执行(跟x差不多,我还不清楚两者的区别)
作者: hupeng923 发布时间: 2004-11-24
chmod u+s `which mount` 会将/bin/mount设成setuid root,即是说任何用户在执行这个指令时会拥有root权限,可以想superuser一样用此指令做这个指令可做的任何事。Root拥有的setuid的程序有潜在的危险性,一般用sudo来设置会好一点。
作者: Fleta 发布时间: 2004-11-24
恩,对,但是有时候需要,
作者: xiaorui 发布时间: 2004-11-24
some experiences for guys here:
i noticed that usually only several items in /bin/ should have the priviliage of 's',such as mount, su, ping, umount and so on.
So to solve the problem above you can use the command 'chmod u+s' only to these command instead of /bin/*.
i noticed that usually only several items in /bin/ should have the priviliage of 's',such as mount, su, ping, umount and so on.
So to solve the problem above you can use the command 'chmod u+s' only to these command instead of /bin/*.
作者: lvzhe 发布时间: 2004-11-26