Can't change password in SSH

What is the problem?

Running octoprint from my android phone, and it asked me to log in. I don't remember ever getting the setup wizard to even set up a password.

What did you already try to solve it?

tried removing users.yaml (was already missing) and then I tried to edit config.yaml but was unable to open that file using sudo commands to reenable the setup wizard.

Have you tried running in safe mode?

yes

Did running in safe mode solve the problem?

no

Systeminfo Bundle

Octo4a on a Samsung galaxy s8

Log

Welcome to Alpine!

The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <http://wiki.alpinelinux.org/>.

You can setup the system with the command: setup-alpine

You may change this message by editing /etc/motd.

localhost:~#
localhost:~#
localhost:~# source~/octoprint/bin/activate
-ash: source~/octoprint/bin/activate: not found
localhost:~# .octoprint
-ash: .octoprint: not found
localhost:~# setup-alpine
-ash: setup-alpine: not found
localhost:~# setup-alpine
-ash: setup-alpine: not found
localhost:~#
localhost:~# config
-ash: config: not found
localhost:~# ls
OctoPrint-OctoPrint-d60c5a6  octoprint.zip
extensions
localhost:~# ls =als
ls: =als: No such file or directory
localhost:~# 1s -als
-ash: 1s: not found
localhost:~# ls
OctoPrint-OctoPrint-d60c5a6  octoprint.zip
extensions
localhost:~# cd .octoprint
localhost:~/.octoprint# ls
config.backup    logs             slicingProfiles  virtualSd
config.yaml      plugins          timelapse        watched
data             printerProfiles  translations
generated        scripts          uploads
localhost:~/.octoprint# config.yaml
-ash: config.yaml: not found
localhost:~/.octoprint# rm config.yaml
localhost:~/.octoprint# sudo nano config.yaml
-ash: sudo: not found
localhost:~/.octoprint# sudo nano
-ash: sudo: not found
localhost:~/.octoprint# sudo nano config.yaml
-ash: sudo: not found
localhost:~/.octoprint# run config.yaml
-ash: run: not found
localhost:~/.octoprint# rm users.yaml
rm: can't remove 'users.yaml': No such file or directory
localhost:~/.octoprint# sed
BusyBox v1.33.1 () multi-call binary.

Usage: sed [-i[SFX]] [-nrE] [-f FILE]... [-e CMD]... [FILE]...
or: sed [-i[SFX]] [-nrE] CMD [FILE]...

        -e CMD  Add CMD to sed commands to be executed
        -f FILE Add FILE contents to sed commands to be executed
        -i[SFX] Edit files in-place (otherwise sends to stdout)
                Optionally back files up, appending SFX
        -n      Suppress automatic printing of pattern space
        -r,-E   Use extended regex syntax

If no -e or -f, the first non-option argument is the sed command string.
Remaining arguments are input files (stdin if none).
localhost:~/.octoprint# sed -i -e 'sfirsRun: false/firstRun: true/g' ~/.octoprin
t/config.yaml
sed: bad option in substitution expression
localhost:~/.octoprint# sudo service octoprint restart
-ash: sudo: not found
localhost:~/.octoprint# restart
-ash: restart: not found
localhost:~/.octoprint# sudo
-ash: sudo: not found
localhost:~/.octoprint# ~/.octoprint/config.yaml
-ash: /root/.octoprint/config.yaml: not found
localhost:~/.octoprint# config.yaml
-ash: config.yaml: not found
localhost:~/.octoprint# sudo nano
-ash: sudo: not found
localhost:~/.octoprint# sudo nano config.yaml
-ash: sudo: not found
localhost:~/.octoprint# sudo nano confguration.yaml
-ash: sudo: not found
localhost:~/.octoprint# sudo nano configuration.yaml
-ash: sudo: not found
localhost:~/.octoprint# ls
config.backup    plugins          timelapse        watched
data             printerProfiles  translations
generated        scripts          uploads
logs             slicingProfiles  virtualSd
localhost:~/.octoprint# ls -a
.                generated        scripts          uploads
..               logs             slicingProfiles  virtualSd
config.backup    plugins          timelapse        watched
data             printerProfiles  translations
localhost:~/.octoprint# sudo reboot
-ash: sudo: not found
localhost:~/.octoprint# sudo config.yaml
-ash: sudo: not found
localhost:~/.octoprint#

The first place to read is this FAQ entry:

Looked into that, still no luck

The description you give of your setup, system, what you tried and what result it gave is not really comprehensive.
What device are you trying to run OctoPrint on? How did you install it?
You're not trying to install on a mobile phone with Alpine / postmarketOS, are you?

They said they're using Octo4A, an android app for running an OctoPrint server.

feelfreelinux/octo4a: Use your old Android device as an OctoPrint server. (github.com)

Like Charlie_Powell stated, I'm running octo4a on a mobile phone (galaxy S8)

I had no intentions of using Alpine or postmarketOS (don't even know what those are lol)

In that forum you tagged, who would user be? Just my SSH username?

I didn't realise they put the server on a phone. Ok, I'm out.

Why is there a difference?

There should be a space between "source" and "~/octoprint/bin/activate"

.octoprint is likely a folder. You may have meant to "cd" into the folder: cd .octoprint

You probably meant ls -la (ls as in list, and a dash instead of equals sign)

In the first line, you seem to want to edit the file config.yaml. But you only stated the filename, and not what to do with it. If you do so, linuxes will try to find an executable with that name in your system path. An executable with that name does not exist.

The second command flat out deleted the config.yaml that was probably there. Any following attempt to edit the file will result in a new empty file. But it does not mean the file was empty to begin with; you removed it yourself.

Alpine unix (often) does not have a sudo. You are probably already the superuser. Just remove "sudo" from the commands.

The rest is all sorts of things that all fail because there is no sudo. Perhaps you should first look in to what these commands mean before typing them.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.