Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


HowTo: install moOde without using the RPi Imager tool
#1
[ETA - this post is for contrarians. The RPi Imager tool “just does it.”]

Some of us are set in our ways and want to use tools such as Balena Etcher, Win32 Disk Imager, the venerable dd, etc, to flash a fresh moOde image to a uSD card (or other medium).

This still works to flash the image BUT it fails to account for a change in the underlying Raspberry Pi OS, which no longer comes with a default user account with preset username and password.

Here's how to overcome that.

1) flash moOde to uSD card using your favorite tool.
---DO NOT boot the card in your Pi yet.---


2) mount the resulting uSD card in a running Linux, Windows, or MacOS system.

3) go to the /boot partition on the card, however you do that on your system

4) create a text file named userconf or userconf.txt and in it place the single line

username:<encoded password>

5) also create an empty text file in the same directory with the name ssh

That's it. You can now boot the uSD card in your Pi

Wait, you say---what's that <encoded password>??? Ay, there's the rub. The new stance of the RPi Foundation is to exchange no plain-text passwords (see the references in the moOde Setup Guide for reasons why this is).

Here's the Linux way to generate the encoded password from the command line

echo 'mypassword' | openssl passwd -6 -stdin

where you substitute your chosen plain-text password for mypassword. (Sorry, I don't know what one does in Windows or MacOS, but Google is your friend.)

Here's what I get the first time I run that command for the now hopelessly compromised default password 'raspberry' (happened to run it on a Pi but the same works on my Linux Mint laptop)

Code:
pi@test:~ $ echo 'raspberry' | openssl passwd -6 -stdin
$6$PrVWl8WLoHCJKW7q$.ee5GsTGGI36MtKhEf8VZHfUdb3TiLSfByZSDxnLuRehM96HHw9xh.FR5P2l9eWUy0VXlxaYcK8Tfcmb6c7hz/

The encoded password is the entire 107 visible character output including any so-called punctuation marks such as full-stop (period), etc. Each time I run the command I'll get a different result. That's part of the magic of the SSL/TLS key system.


So, to create  a default pi:raspberry account, the userconf file contains

Code:
pi:$6$PrVWl8WLoHCJKW7q$.ee5GsTGGI36MtKhEf8VZHfUdb3TiLSfByZSDxnLuRehM96HHw9xh.FR5P2l9eWUy0VXlxaYcK8Tfcmb6c7hz/

Boot the uSD card and enjoy. You'll notice that both the files you created in /boot are now gone.


Regards,
Kent

Footnotes:
  • I've tested this and it works for me but YMMV. This information comes from the RPi documentation but ....
  • Please don't continue to use pi:raspberry for the default (or any) account. The wide-spread bad-guy practice of credential stuffing has made this username:password forever compromised.
  • IMHO, username pi is pretty innocuous but the new Raspberry Pi OS and moOde allow you to chose any username during this initial setup.
  • this procedure enables the SSH daemon (sshd) which allows you to login to the moOde player from another computer, etc. The WebSSH feature included in moOde does not. Instead it starts and stops its own shellinaboxd daemon which does not allow external access. If you need to for some reason, you could omit creating the /boot/ssh file. In this case, the resulting moOde will still boot properly and the  WebSSH feature will still work. I have no idea what might not work. You could always re-enable  sshd via the WebSSH terminal.But that's Linux admin stuff and Google is your friend.
Regards,
Kent
Reply


Forum Jump: