Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support user creation at build-time for raspbian and raspios #179

Open
sunefred opened this issue Nov 4, 2022 · 1 comment
Open

Support user creation at build-time for raspbian and raspios #179

sunefred opened this issue Nov 4, 2022 · 1 comment

Comments

@sunefred
Copy link

sunefred commented Nov 4, 2022

I am having some problems with functionality that requires a user and a home folder in my distro. I am using the base module to add the user and set the password:

export BASE_USER="myuser"
export BASE_ADD_USER="yes"
export BASE_USER_PASSWORD="mypassword"

Because the code path that updates the user for raspbian and raspios uses the /boot/userconf.txt method, the user is not created at build-time so myuser and its home folder will not exist during build. This also affects built in functionality, such as unpack which will fail with "User not found".

unpack /filesystem/home/myuser /home/"${BASE_USER}" "${BASE_USER}"

My workaround is to set the distro to something else to trigger normal user creation. This works for me only because I do not use other modules that requires the BASE_DISTRO variable.

export BASE_DISTRO="other"

Why not skip the /boot/userconf.txt method all together?

@sunefred sunefred changed the title Support user creation at build-time for raspbian, raspios Support user creation at build-time for raspbian and raspios Nov 4, 2022
@guysoft
Copy link
Owner

guysoft commented Apr 11, 2023

Hey, just saw this now.
What base image are you using?
You can use the pi user and it should let uou access the user during build time

What exactly are you trying to rum?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants