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

nightly build: 64 bit 2021-01-12 - pi user not in sudoers #712

Closed
dan-and opened this issue Jan 12, 2021 · 4 comments
Closed

nightly build: 64 bit 2021-01-12 - pi user not in sudoers #712

dan-and opened this issue Jan 12, 2021 · 4 comments

Comments

@dan-and
Copy link

dan-and commented Jan 12, 2021

What were you doing?

I tried to install the new 0.18 RC2 64 Bit version: http://unofficialpi.org/Distros/OctoPi/nightly-arm64/2021-01-12_octopi-20.10-preinstalled-server-arm64+raspi-0.18.0.zip on a raspberry pi4

Booting and logging in as user pi works fine

What did you expect to happen?

I can login with the user pi and sudo to root

What happened instead?

The user pi is not allowed to sudo

Suggestion:

I loaded the sdcard on another linux machine and added the user pi to /etc/sudoers, but I think that should not be the right way.

Since two days, the new 64 build is based on ubuntu, so checking /etc/passwd did lightened me up:
I have to login as ubuntu (pw: ubuntu for the first time) as well.

The ubuntu user is ofcourse allowed to sudo.

The main issue with this is:
Either kick out the whole ubuntu user and continue using just the pi user for sudo and octoprint or switch over to the ubuntu user.

But most important: Let the people know that there are two users with default passwords on the current "preinstalled-server-arm64" images: user pi with "raspberry" and user ubuntu with "ubuntu"
These users should not stay untouched

Version of OctoPi

0.18.0 RC2 "nightly Build" http://unofficialpi.org/Distros/OctoPi/nightly-arm64/2021-01-12_octopi-20.10-preinstalled-server-arm64+raspi-0.18.0.zip

I have read the FAQ.

@guysoft
Copy link
Owner

guysoft commented Jan 12, 2021

Yep, its an issue. I think the ubuntu user is generated from cloudinit. Will have to test how to remove it, and give user pi sudo.

https://askubuntu.com/questions/1183370/ubuntu-1910-server-install-on-raspberry-pi-4-hangs-on-cloud-init

I think this should make it work, will commit and you can test the nightly/executing in your image as root:

usermod -a -G sudo pi

guysoft added a commit to guysoft/CustomPiOS that referenced this issue Jan 12, 2021
@chrislavender
Copy link

None of the above worked for me. Including trying to disable cloud init via the referenced askubuntu link. However, what did work was switching to the root user (after setting up a password for root), cd-ing into /etc/sudoers.d and adding the logged in user to the 90-cloud-init-users file in the same way one would add them to the regular sudoers file.

From what I can surmise it appears that 90-cloud-init-users is overriding anything else with regard to sudo access.

@guysoft
Copy link
Owner

guysoft commented Feb 2, 2022

Hey,
So I tested the latest nightly from today and sudo works on the pi user. So unless anyone has any other input I am closing this.
Also note that if you flash form rpi-imager with custom settings the image has booting issues and reaches this issue: raspberrypi/linux#4458

@guysoft
Copy link
Owner

guysoft commented Oct 25, 2024

Hey, this has been merged and tested, closing, reopen if there is an issue

@guysoft guysoft closed this as completed Oct 25, 2024
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

3 participants