Changing the root password?

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

robdaemon
Atariator
Atariator
Posts: 26
Joined: Mon Jul 24, 2017 5:01 am

Changing the root password?

Postby robdaemon » Sat Mar 09, 2019 3:46 am

Hi there,

I tried to change my root password on the MiSTer after logging in, and after a reboot, I could no longer login.

After the reboot, it was attempting to force me to change the password again but would not complete the change. I ended up backing up my SD card and running the installer again.

Attached is a screenshot from putty when I did it.

I'd really like to change this password - I don't like leaving things on my network with a default password.

Thanks!
You do not have the required permissions to view the files attached to this post.

fry
Atarian
Atarian
Posts: 7
Joined: Sun Dec 16, 2018 4:16 am

Re: Changing the root password?

Postby fry » Sat Mar 09, 2019 5:15 am

How did you change it? The normal method ("passwd" command) worked fine for me.

Better yet, just disable password logins in /etc/ssh/sshd_config and use an SSH key.

Locutus73
Atari Super Hero
Atari Super Hero
Posts: 503
Joined: Wed Feb 07, 2018 6:13 pm

Re: Changing the root password?

Postby Locutus73 » Sat Mar 09, 2019 10:46 am

Just for your info: if you want to harden MiSTer Linux a bit, you could try security_fixes.sh here https://github.com/MiSTer-devel/Scripts_MiSTer or already in your /media/fat/#Scripts if you use the updater. As usual: use it at your own risk and don’t blame me if you lock yourself out or if your MiSTer gets self conscious and starts a war against the human race.
Anyway passwd obviously works and copying linux.img from the installer on the SD reverts back all Linux changes.

Regards.

Locutus73

robdaemon
Atariator
Atariator
Posts: 26
Joined: Mon Jul 24, 2017 5:01 am

Re: Changing the root password?

Postby robdaemon » Sat Mar 09, 2019 5:14 pm

fry wrote:How did you change it? The normal method ("passwd" command) worked fine for me.

Better yet, just disable password logins in /etc/ssh/sshd_config and use an SSH key.


I used passwd - it worked fine until a reboot.

robdaemon
Atariator
Atariator
Posts: 26
Joined: Mon Jul 24, 2017 5:01 am

Re: Changing the root password?

Postby robdaemon » Sat Mar 09, 2019 5:15 pm

Locutus73 wrote:Anyway passwd obviously works and copying linux.img from the installer on the SD reverts back all Linux changes


passwd doesn't obviously work, as that's how I got into this situation to begin with.

I didn't know about copying the linux.img over though, that helps a lot. I'll try out the security script you mentioned too.

Thanks!

Locutus73
Atari Super Hero
Atari Super Hero
Posts: 503
Joined: Wed Feb 07, 2018 6:13 pm

Re: Changing the root password?

Postby Locutus73 » Sat Mar 09, 2019 6:11 pm

robdaemon wrote:
Locutus73 wrote:Anyway passwd obviously works and copying linux.img from the installer on the SD reverts back all Linux changes


passwd doesn't obviously work, as that's how I got into this situation to begin with.

That’s really weird.

robdaemon wrote:I didn't know about copying the linux.img over though, that helps a lot. I'll try out the security script you mentioned too.

Thanks!

Let us know how it ends, the script uses passwd as well.

Regards.

Locutus73


Return to “MiSTer”

Who is online

Users browsing this forum: brNX and 9 guests