Changing the root password?

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

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

Locked
robdaemon
Atari User
Atari User
Posts: 38
Joined: Mon Jul 24, 2017 5:01 am

Changing the root password?

Post by robdaemon »

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?

Post by fry »

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: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: Changing the root password?

Post by Locutus73 »

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
Atari User
Atari User
Posts: 38
Joined: Mon Jul 24, 2017 5:01 am

Re: Changing the root password?

Post by robdaemon »

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
Atari User
Atari User
Posts: 38
Joined: Mon Jul 24, 2017 5:01 am

Re: Changing the root password?

Post by robdaemon »

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: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: Changing the root password?

Post by Locutus73 »

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
Locked

Return to “MiSTer”