guysoft / OctoPi

Scripts to build OctoPi, a Raspberry PI distro for controlling 3D printers over the web
GNU General Public License v3.0
2.49k stars 369 forks source link

OctoPrint runs as pi user #793

Open johnny-b-goode opened 2 years ago

johnny-b-goode commented 2 years ago

I installed OctoPi 0.18.0 and was going through various local configuration tasks. When preparing to remove the default pi user I noticed that OctoPrint seems to be installed to, or using a number of files located in, the pi home directory (/home/pi). This is confirmed by looking at /etc/systemd/system/octoprint.service: ... User=pi ExecStart=/home/pi/oprint/bin/octoprint serve --host=${HOST} --port=${PORT} ...

In general, OctoPrint should probably run as its own user. Additionally, this may be a problem in the future, as the pi user has been removed by default: https://www.raspberrypi.com/news/raspberry-pi-bullseye-update-april-2022/.

cp2004 commented 2 years ago

Yes, we're all aware of how it works, but changing it now means changing/making outdated a huge number of guides and resources and knowledge, which there is no bandwidth to solve right now in the project. It is not a simple change.

Maybe in the future it will be changed, but not any time soon, and it would probably be part of a wider rework of how some of the stuff is installed to make it worthwhile the pain of changing it.

The problem of removing the default Pi user was solved already, and users can customise the username with the Raspberry Pi imager if they would like to before flashing.