`
LK.Bing
  • 浏览: 79513 次
  • 性别: Icon_minigender_2
  • 来自: 临川->成都
社区版块
存档分类
最新评论

Ubuntu下实现root自动登录

阅读更多
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://anriqing.blogbus.com/logs/69946037.html

Ubuntu为了系统安全,root帐号的密码是随机的,如果临时需要提升至root权限以执行一些命令,需要使用sudo命令。公司里有几台使用Ubuntu的机器,因为使用者不固定,并且执行程序时需要使用到root权限,所以需要将这几台机器配置为自动登录到root账户。查阅了相关资料后,可以通过以下两步来实现这个目的:

1. 为root账户修改一个密码;

    在终端下输入”sudo passwd root”命令,终端会提示输入当前账户密码,正确输入后,再输入两次你想要为root账户赋予的密码即可。



2. 设置root账户自动登录;

    编辑/etc/gdm/custom.conf文件,修改其中的AutomaticLoginEnable,AutomaticLogin,TimedLogin三项,具体如下所示:

[daemon]
AutomaticLoginEnable=true 这个修改为true
AutomaticLogin=root            这个修改为root
TimedLoginEnable=false
TimedLogin=root                  这个修改为root
TimedLoginDelay=10
DefaultSession=gnome
分享到:
评论
1 楼 bushkarl 2010-08-24  

相关推荐

Global site tag (gtag.js) - Google Analytics