Login Problems

Hi All,

Have a very odd problem I hope you can help with.

I’ve had a look across forum posts but can’t find anything quite like it.

When I try and log in via a web browser using pi/emonp12016 I’m told username does not exist.

However, when I try via SSH, I successfully log in.

I’m at a bit of a loss as to how to proceed.

Any help will be most appreciated.

Thanks,
Richard

To log in to emonCMS (your local version?), you need to use the Username & Password you gave it when you first set up emonCMS.

If you’ve forgotten it, there’s a script to reset it (after you’ve got in via SSH):

php /opt/emoncms/modules/usefulscripts/resetpassword.php

If you’ve got a new SD card, you must Register the first time.

1 Like

Thanks for such a prompt reply.

To clarify, I have previously set up the system and used it successfully.

I typed in what I’d saved (in my password manager) as my username and password.

The system responded that the username did not exist.

I tried the default (pi/emonpi2016) and it told me that didn’t exist either.

I can log in using those credentials via SSH.

I tried your recommended script and it asked me for a user name. I typed in my username and set a new password.

I restarted the browser connection and typed in the username and new password and it told me the user did not exist.

I went back to SSH login, and used getent to list all the users in /etc/passwd. My user is listed there.

Still stuck.

Thanks,
Richard

Don’t know if it helps but here is the gentent listing of my user entry in /etc/passwd

richard:x:1002:1002::/home/richard:/bin/bash

Odd but not unheard of.

Have you logged in before using the saved credentials or is this a new install?

unsurprising as these are for the SSH only - there is no default for the web UI of emoncms

But that is not where the web UI details are kept.

That is odd. Did you use the same username as you had saved in the password manager (probably not pi)?

To be absolutely clear the user password for SSH is not the same as the web UI user/password combo.

1 Like

Thanks.

I got a bit bored of it all and downloaded a new image. I’ll load it this evening and let you all know how it goes.

Just remember to be patient on first boot (it takes quite a while) and at the first Web UI screen you need to register the first account.

https://docs.openenergymonitor.org/emoncms/intro-rpi.html

If you use the ‘old’ SD csrd, you will of course lose all your old data. To avoid this, retain the old SD card and write the new download to a new SD card. You might then be able to recover the old data.

When you say, ‘quite a while.’

How long is a while?

How long have you waited? Is this an emonPi?

I ran it overnight but it was still saying Booting after 9 hours.

So, just in case I’d popped the SD card out of the slot before all the files had been written, I re-burned it and shut the computer down to force all the writes to happen.

It’s been booting for 90 mins at the moment.

Just about to go shopping. Will check on it again when I get back.

It’s an emonPi.

Thanks,
Richard

Yes it does seem to get stuck here. After that time, I’d suggest just a reboot will sort it out.

Back from shopping. Still Booting.

Switched it off, waited 30 secs, switched it back on again.

Same behaviour.

Half an hour ago repeated. Still the same.

Booting…Please Wait.

I downloaded this image: emonSD-10Nov22 (Stable)

My EmonPi is from 2019.

Don’t know if that information is relevant. Thought I’d post it in case it was.

Thanks.

I have also tried booting it with and without the sensor cables attached.

No difference.

That’s as expected, because all sensors feed into the “emon” ATMega 328P processor, not the Raspberry Pi.

I recently wrote the same image (10 Nov 22) to a 32 GB SD card using Balena Etcher, it booted absolutely normally in a RPi 2B. Which tools did you use to write the image to your SD card?

Raspberry Pi Imager.

At this stage, it might be worth trying balenaEtcher - Flash OS images to SD cards & USB drives. You do not need to unzip the downloaded image with this.

Have you checked the MD5 for the zip: 271d8d502e822e3703500a5762519c1d [NOT as published!]
and the image (emonSD-10Nov22_16gb.img) : f5d7963ffa585231210a5b4f560fc39e

@TrystanLea
Note the incorrect MD5 Hash. :exploding_head:

Hi,

Reburned the SD card using Etcher.

It worked well.

Back up and running.

Thanks everyone.

1 Like

I think the RPi Imager try to be too clever. One for the docs.