[Freedombox-discuss] password reset partitial success
Geert Stappers
stappers at stappers.nl
Thu Nov 14 18:58:07 GMT 2019
On Wed, Nov 13, 2019 at 02:45:44PM -0800, Sunil Mohan Adapa wrote:
> On 13/11/19 2:09 pm, Johannes Keyser wrote:
> > Hello Geert,
> >
> > I'm not sure whether this is still up to date, but look at Sunil's
> > answer at https://salsa.debian.org/freedombox-team/plinth/issues/1242.
> > My guess would be that you have to chroot into the SD card to do this.
>
> Using this command will work for LDAP user accounts (all users created
> using FreedomBox web interface) but not for 'fbx' user account which a
> regular account. So, this command can used change the password for the
> user one has created during first setup wizard (SSH will work but
> perhaps not web login because that password is different).
>
> >
> > Another idea to gain SSH-login might be to add an SSH-pubkey into fbx's
> > .ssh/authorized_keys, but I haven't tried that.
> >
>
> This should work any admin user or 'fbx' user.
Confirming that placing SSH-pubkey in ~fbx/.ssh/authorized_key
got me ssh access.
> On 13.11.19 20:07, Geert Stappers wrote:
> >>
> >> Hello,
> >>
> >> How to do a password reset for a freedombox?
> >>
> >> Yes, I forgot the password from my freedombox.
> >> ( Hardware is Olimex A20 "Pioneer" kit )
That hardware does have a battery, which serves as UPS (uninterruptable
power supply). This cool feature has a small downside.
I removed the SD-card, placed the SSH-pubkey, reinserted the SD-card.
Try another ssh login, got prompted for a password :-(
Unplugged the battery, that got me a "power off".
Did "power on", waited for ssh daemon to come alive
and could ssh log in :-)
> >> At https://wiki.debian.org/FreedomBox/Manual/SecureShell
> >> is only "change password" documented.
> >>
> >> What I tried
> >>
> >> * removed SD card from fdbx
> >> * SD card into another Linux box
> >> * mounted the SD card under /mnt
> >> * sudo vi /mnt/etc/passwd # changed "fbx:*:" into "fbx::"
> >> * SD card back in fdbx
> >> * ssh fbx at myfdbx # but still a password prompt
>
> This did not work because the default SSH configuration is disallow
> empty passwords (for security reasons).
Ah. Thanks for explaining.
> Simple passwd command on the fbx user should work. Try this:
>
> passwd --root /mnt fbx
>
| $ sudo passwd --root /mnt fbx
| passwd: Cannot determine your user name.
| $ sudo su -
| # passwd --root /mnt fbx
| passwd: Cannot determine your user name.
| #
Reading the manual page of `passwd` learnt me that it uses "chroot".
Inside the chroot is the architecture `armv7l`, the host has another
architecture. I think the arch difference causes the "Cannot determine"
Groeten
Geert Stappers
Has login access, now needs `sudo password` :-/
--
Leven en laten leven
More information about the Freedombox-discuss
mailing list