Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Fails to load global password on Stretch => Buster dist-upgraded systems #2937

Closed
MattL0 opened this issue Jun 25, 2019 · 7 comments
Labels
Milestone

Comments

@MattL0
Copy link

MattL0 commented Jun 25, 2019

Creating a bug report/issue

Required Information

  • DietPi version |

#!/bin/bash
G_DIETPI_VERSION_CORE=6
G_DIETPI_VERSION_SUB=24
G_DIETPI_VERSION_RC=1
G_GITBRANCH='master'
G_GITOWNER='MichaIng'

  • Distro version |

10.0

  • Kernel version |

Linux DietPi-Salon 4.19.50-v7+ #896 SMP Thu Jun 20 16:11:44 BST 2019 armv7l GNU/Linux

  • SBC device |

RPI3 and RPI3b+

Steps to reproduce

  1. upgrade buster from a stretch install
  2. load dietpi-software

Expected behaviour

  • Should be able to retrieve password?

Actual behaviour

  • see picture , dietpi fallback passw seems to work.
    Capture
@MichaIng
Copy link
Owner

@MattL0
Ah you upgraded from Stretch, then this makes sense.

Okay since I don't want to print the encryption keys and stuff here (although it's open source, if one wants to find it 😉), the easiest is:

rm /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin
G_CONFIG_INJECT 'AUTO_SETUP_GLOBAL_PASSWORD=' 'AUTO_SETUP_GLOBAL_PASSWORD=yourPassword' /DietPi/dietpi.txt
  • Choose yourPassword freely of course.
  • Next time DietPi-Software will re-encrypt this password silently.

The issue was that on Buster a new key derivation method is available and if not used, ugly warnings are printed. So some DietPi versions ago we moved Buster systems passwords to the new encryption method. But if you upgrade a system from Stretch to Buster, this is not done, hence DietPi-Software tries to use a key derivation method that does not fit the one of the encrypted password => failure.

I will add the ondemand encryption method upgrade to every DietPi-Software and more current DietPi-Update runs. This is actually not a big deal and allows Buster distro-upgrades then.

@MichaIng MichaIng changed the title Dietpi software password error on buster DietPi-Software | Fails to load global password on Stretch => Buster dist-upgraded systems Jun 25, 2019
@MichaIng MichaIng added this to the v6.25 milestone Jun 25, 2019
@MattL0
Copy link
Author

MattL0 commented Jun 25, 2019

thanks :)

@MattL0 MattL0 closed this as completed Jun 25, 2019
@MattL0
Copy link
Author

MattL0 commented Jun 25, 2019

Works perfect *

@MichaIng
Copy link
Owner

@MattL0
Thanks for feedback. I will reopen the issue until I implemented the automatic encryption transition into code.

@MichaIng MichaIng reopened this Jun 25, 2019
@PeterLacknase
Copy link

@MattL0

Out of curiosity:

Steps to reproduce

  1. upgrade buster from a stretch install
  2. load dietpi-software

What where the exact steps (i.e. commands) you used? Did you change anything else apart from sources.list?

@MattL0
Copy link
Author

MattL0 commented Jun 26, 2019

No other step aappart from changing /etc/apt/sources.list.d/raspi.list with buster instead of stretch.

also did

apt update
apt full-upgrade

@MichaIng
Copy link
Owner

MichaIng commented Jun 27, 2019

Finished: DietPi-Software will now automatically attempt do decrypt the password with the Stretch method, if it fails on Buster. If this succeeds, it will automatically re-encrypt the password with the Buster method.
Changelog: 15038cf

Will be merged into Beta 6.25.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants