Password explanation

Hi guys,

On the start of Dietpi distro there is a step:

Change existing unix user passwords? ││ ││ DietPi has two accounts by default “root” and “dietpi”. On first boot, both share the global password “dietpi”, ││ respectively the one set in “dietpi.txt”. ││ ││ It is highly recommended to change this password, ideally, it should be different than the global software password. ││ ││ Would you like to change the login passwords for “root” and “dietpi”?

What the heck is it about so I can not get it what is this global software password?

I thought that root is root like admin with all privileges.
And dietpi is like a user. Now there is magical global software password ?

Plain English please.

YES (hope it was plain enough :wink: )

The global software password we use as initial password on software apps like PiHole, AGH, NextCloud, Deluge, DietPi Dashboard or other apps having a web site login. For security reason it should be different from os user password.

1 Like

Thx, I am still not sure but understand more hopefully. :upside_down_face:

It’s so long ago that I set the GSP. How do I go about resetting the Global Software Password? I installed Dietpi Dashboard and cannot login.

this can be done using dietpi-config. But it will not change existing software installations.

In case of DietPi Dashboard, you would need adjust /opt/dietpi-dashboard/config.toml manually. Within configuration file, you have a section for password configuration and some hints on how to adjust.

1 Like

Thanks Joulinar. There are 2 options I see. Can you explain how to use them?

# To get hash: "echo -n '<PASSWORD>' | sha512sum"
hash = "xxxx
# To get random secret: "openssl rand -hex 32" 
secret = "xxxx"

should be the first one.

I ran the first command, input my current dietpi password to hash it, inserted & saved it in the config.toml file, rebooted the rpi, but when I try to login to the dashboard, I get the message:
“Incorrect password”.
I used my dietpi password and username. Am I doing something incorrectly?

I tested it right now and it’s working for me.
Did you restart the service?
And did you make sure to only copy to the last character of the hash, don’t copy the -
e.g. output of the command: faikhjfaosifhasoifh -
The last charcter would be the h

Yes, because there is nothing where you can add a user name. There should be password field only. If you enter a user, you are in an incorrect login screen. As well it is not your dietpi user password. It is the password you have set by copying the hass value into /opt/dietpi-dashboard/config.toml

I checked it as well and created a new password without issues. To avoid any mistakes during copying password hash from A to B, you can use following

G_CONFIG_INJECT 'hash[[:blank:]]' "hash = \"$(echo -n "password" | sha512sum | mawk '{print $1}')\"" /opt/dietpi-dashboard/config.toml
systemctl restart dietpi-dashboard.service

Close all browser tabs before trying to login again.