问个关于su的问题

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

问个关于su的问题

#1

帖子 yjsword » 2008-11-04 20:30

记得之前在系统没有启用root的时候是可以通过gksu或者su-to-root来获取root权限的,现在不行了,新装的系统,不知道是哪里设置的问题,请教:
yjsword@debian:~$ su
密码:
su:鉴定故障
yjsword@debian:~$ su-to-root -c ls
About to execute ls.
This command needs root privileges to be executed.
Using su...
Enter root password at prompt.
密码:
su:鉴定故障
:em20 :em20 :em20
For Linux
http://blog.yjsword.com/
南無觀世音菩萨
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

Re: 问个关于su的问题

#2

帖子 自由建客 » 2008-11-04 20:35

密码错误,先用 sudo passwd root 改密码吧
头像
chinesejerry
帖子: 510
注册时间: 2007-10-06 3:48
来自: 霍格沃茨魔法学校葛莱芬多学院
联系:

Re: 问个关于su的问题

#3

帖子 chinesejerry » 2008-11-04 20:35

Debian...
你试试sudo su可以不。好像你在su后需要输入root的密码。
Because...nobody really uses an operating system,
people use...programs...on their computer.
And the only mission in life of an operating system is to helps those programs run.
----Linus
头像
yjsword
帖子: 524
注册时间: 2007-03-14 20:33
来自: 南京
联系:

Re: 问个关于su的问题

#4

帖子 yjsword » 2008-11-04 20:42

自由建客 写了:密码错误,先用 sudo passwd root 改密码吧
这样之后就等于启用了root啦,我是想不启用root的 :em06
chinesejerry 写了:Debian...
你试试sudo su可以不。好像你在su后需要输入root的密码。
确实是debian,sudo su是可以用的,就是用新立得的时候,密码框中输入了密码,之后就什么也没有了,看了下启动新立得的命令,发现是su-to-root失败,而su-to-root貌似是调用su的,晕了要!
For Linux
http://blog.yjsword.com/
南無觀世音菩萨
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

Re: 问个关于su的问题

#5

帖子 自由建客 » 2008-11-04 21:31

“重设一遍密码就等于启用 root”什么意思?
难道以前 root 是不能用的?
root 还能被禁用?
不是被禁用,而只不过没人知道密码而已吧!
头像
yjsword
帖子: 524
注册时间: 2007-03-14 20:33
来自: 南京
联系:

Re: 问个关于su的问题

#6

帖子 yjsword » 2008-11-05 9:11

自由建客 写了:“重设一遍密码就等于启用 root”什么意思?
难道以前 root 是不能用的?
root 还能被禁用?
不是被禁用,而只不过没人知道密码而已吧!
$passwd --help
Options:
-a, --all report password status on all accounts
-d, --delete delete the password for the named account
-e, --expire force expire the password for the named account
-h, --help display this help message and exit
-k, --keep-tokens change password only if expired
-i, --inactive INACTIVE set password inactive after expiration
to INACTIVE
-l, --lock lock the named account
-n, --mindays MIN_DAYS set minimum number of days before password
change to MIN_DAYS
-q, --quiet quiet mode
-r, --repository REPOSITORY change password in REPOSITORY repository
-S, --status report password status on the named account
-u, --unlock unlock the named account
-w, --warndays WARN_DAYS set expiration warning days to WARN_DAYS
-x, --maxdays MAX_DAYS set maximim number of days before password
change to MAX_DAYS
我说的禁用大概就是lock吧
For Linux
http://blog.yjsword.com/
南無觀世音菩萨
回复