OctoPrint-WS281x_LED_Status icon indicating copy to clipboard operation
OctoPrint-WS281x_LED_Status copied to clipboard

[Bug]: New versions of octopi have no pi user

Open Brunius opened this issue 1 year ago • 1 comments

Description of the bug

During initial setup, automatic tests discover whether certain OS features are enabled. If these tests fail, an automatic fix is available, with the user being prompted to enter the password for the user 'pi'.

Unfortunately, on new installs of octopi, there is no default 'pi' user, with the user being prompted to create a user instead.

This means that the automatic attempted resolution of these bugs silently fails (worse, it reports that it succeeded!).

This is where my knowledge runs out, however. I was able to enable these features by manually sshing in and enabling them, but not all users will be so savvy. I have no idea if there's a mechanism to detect user accounts and their privileges - that may be a way to resolve this. Alternatively, a quick fix might be to simply duplicate the existing "password" box, and prompt the user for the relevant username (autofilling with 'pi' to preserve current workflow).

Steps to reproduce

On an installation with no "pi" user, and SPI disabled, with the plugin installed and octoprint running:

  1. Open the octoprint settings menu (wrench icon)
  2. Scroll to the bottom, and select "WS281X LED status"
  3. Select the "Utilities" Tab
  4. Scroll down to "Open OS Config Test", and click on it
  5. Select "Run Tests" 5a. Five tests should run. For the purposes of this, it is assumed that test 2 (SPI Enabled) fails.
  6. On the failed "SPI Enabled" test, select the "Fix it" button, and follow the prompts
  7. Observe that you are requested to enter the password for the "pi" user, which does not exist!

What happened instead?

n/a

Plugin version

0.8.1

OctoPrint version

1.8.7

(if relevant) OctoPi version

1.0.0

Log Files & Screenshots

No response

Anything else?

No response

Brunius avatar May 11 '23 14:05 Brunius

That should just be a label that needs to be changed - the plugin operates under the same user that OctoPrint is running as, so it performs the checks and runs the 'fixes' as your user, you just need to provide it the password to your user.

cp2004 avatar May 11 '23 22:05 cp2004