在 yocto build 中禁用 root 登录 [英] Disable root login in yocto build

查看:46
本文介绍了在 yocto build 中禁用 root 登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 yocto 项目的新手,我只想在 yocto 构建映像中禁用 root 登录?我不希望我的最终图像要求我登录.只是我需要在 sdcard 上刷入我的 yocto 图像并且不显示登录提示.

I am new in yocto project and I simply want to disable root login in yocto build image? I do not want my final image to ask me for login. Simply I need to flash my yocto image on sdcard and no login prompt shows.

感谢任何帮助.

推荐答案

如果您使用的是 systemd,请在文件 meta/recipes-core/systemd/systemd-serialgetty/serial-getty@ 中.服务将服务中的 ExecStart 更改为:

If you are using systemd, in the file meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service change the ExecStart in the service to this :

ExecStart=-/sbin/agetty -a USERNAME -8 -L %I @BAUDRATE@ $TERM

将 USERNAME 更改为 root 或其他.

change USERNAME to root or other.

这篇关于在 yocto build 中禁用 root 登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆