CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 8724|回复: 6

【求助】lubuntu默认root自动登陆!

[复制链接]
发表于 2014-7-16 10:30:35 | 显示全部楼层 |阅读模式
装了一个lubuntu server版,本来都很顺利,可是昨天连了VGA显示器一看发现居然root已经自动登陆了,设置了root密码也是一样自动登陆。

个人能力有限,实在不知道那里出了问题,希望大家能够提供帮助,谢谢!

ps.linaro用户已经被我删掉了。
回复

使用道具 举报

 楼主| 发表于 2014-7-17 01:38:39 | 显示全部楼层
自己解决了!

在/etc/default目录下有一个autogetty文件,内容如下:

    # here you can provide what to run instead of /bin/login
    AUTOGETTY_ARGS="-n -l /usr/bin/auto-root-login"

    # Should autogetty be enabled?
    ENABLED=1

只要将ENABLE=1改成ENABLE=0就可以了。
回复 支持 反对

使用道具 举报

发表于 2014-9-16 10:38:19 | 显示全部楼层
正需要的,谢谢
回复 支持 反对

使用道具 举报

发表于 2014-9-16 12:05:40 | 显示全部楼层
我试过了,修改之后,串口无法控制,只能用SSH控制
回复 支持 反对

使用道具 举报

发表于 2014-9-27 14:56:52 | 显示全部楼层
wpd 发表于 2014-7-17 01:38
自己解决了!

在/etc/default目录下有一个autogetty文件,内容如下:

lubuntu-server-nand-vga.img       lubuntu server  官网下载的最新版,按此方法试过了,不行。
回复 支持 反对

使用道具 举报

发表于 2014-11-26 23:43:47 | 显示全部楼层
wpd 发表于 2014-7-17 01:38
自己解决了!

在/etc/default目录下有一个autogetty文件,内容如下:

试过了,本地还是依然root登录,ssh远程已经无法访问。。。。

谁解决这个问题了,粗来分享下经验子撒~~
回复 支持 反对

使用道具 举报

发表于 2014-11-27 00:09:43 | 显示全部楼层
找到解决办法了。。。。哈哈哈哈~~~~~

执行:mv /etc/init/openvt.conf /etc/init/openvt.conf.bak 就可以解决问题啦!!!

参考资料:
  1. Ok, I figured it out. So this is how login works. There is an init script in /etc/init/tty1.conf which runs getty. Getty is a program that waits for login connections, and then authenticates a user. I initially thought getty was being run with autologin, and so I looked for a line in /etc/init/tty1.conf like
  2. exec /sbin/getty -8 38400 -a root tty1
  3. which means, open an 8bit terminal at 38400 baud and autologin the root user into tty1. But when I looked at the file, there was no -a option to autologin the root user. I'm stating this because /etc/init/tty1.conf should be the first place to look if others face the same issue.

  4. Then I looked through the /etc/init/ directory and found a file called openvt.conf. This had the following line:
  5. exec /bin/login -f root
  6. This was the culprit. The login command with the -f option automatically logs the user in without authentication.

  7. Since the openvt.conf file is intended to be an upstart service, it has to be disabled in a particular way, although one can also simply delete the file. See this askubuntu post about upstart. In short, either delete the openvt.conf file, or run
  8. echo manual | sudo tee /etc/init/openvt.override
  9. and then root is no longer logged in automatically.
复制代码
出处:http://superuser.com/questions/7 ... ot-without-password
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-4-30 10:25 , Processed in 0.029292 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部