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

When specifiying FIRST_USER_NAME, it is not added to sudoers correctly #422

Open
FrancisTurner opened this issue Jun 15, 2020 · 0 comments

Comments

@FrancisTurner
Copy link

If you specify FIRST_USER_NAME in the config file then almost everything works but when
doing sudo with it, you need to enter the password. This is because the file 010_pi-nopasswd in sudoers.d still references user pi and is not changed to FIRST_USER_NAME

The fix is to add the following to stage2/01-sys-tweaks/01-run.sh around line 47

# Add line to replace the username for pi in sudoers.d/010_pi-nopasswd
on_chroot <<EOF
sed "s/pi/$FIRST_USER_NAME/" -i /etc/sudoers.d/010_pi-nopasswd
EOF
# End replace username 
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

1 participant