Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gnome桌面下 普通用户切换为root用户失败
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese)
View previous topic :: View next topic  
Author Message
yuqingcai
n00b
n00b


Joined: 20 Jul 2012
Posts: 3

PostPosted: Fri Jul 20, 2012 8:49 am    Post subject: gnome桌面下 普通用户切换为root用户失败 Reply with quote

大家好:)
刚装完gentoo,桌面用的是gnome,在gnome-terminal下运行su命令切换成root账户时正常(第一次切换成root),su 回普通账户也正常,可当再次用su命令切换成root账户时却失败了(第二次切换成root),输入密码后终端一直没有响应。不知有没有人遇到这个情况?
而且当我从root账户切换回普通用户以后,环境变量PATH也被改变了。
原来的PATH值为:"/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.5.3:/usr/games/bin"
当从root切换回来以后PATH值变为:/bin:/usr/bin"
Back to top
View user's profile Send private message
heroxbd
Developer
Developer


Joined: 11 Dec 2011
Posts: 27
Location: Sendai, Japan

PostPosted: Tue Aug 14, 2012 1:08 am    Post subject: Reply with quote

PATH 等环境变量的变化是正常的。想要跟普通用户的一样,可以

Code:
su - <user>


这个 "-" 代表使用 login shell,http://goo.gl/xLxbV 有一点关于它的讨论。

Quote:
再次用su命令切换成root账户时却失败了(第二次切换成root),输入密码后终端一直没有响应。


这比较奇怪,不过你为什么要这么干呢?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum