When i reinstall a sofware via command line

Creating a bug report/issue

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=8
    G_DIETPI_VERSION_SUB=13
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’
    G_LIVE_PATCH_STATUS[0]=‘applied’
    G_LIVE_PATCH_STATUS[1]=‘not applicable’

  • Distro version | bullseye 0

  • Kernel version |Linux DietPi 5.15.84-v8+ #1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023 aarch64 GNU/Linux

  • SBC model | RPi 4 Model B (aarch64)

Additional Information (if applicable)

  • Software title | every title
  • Was the software title installed freshly or updated/migrated? Freshly
  • Can this issue be replicated on a fresh installation of DietPi?

Steps to reproduce

  1. sudo dietpi-software reinstall 94

Expected behaviour

  • No popup message that says
    | [FAILED] Unable to obtain your global software password │
    │ │
    │ The following fallback password will be used: │
    │ - dietpi │
    │ │
    │ You can change it via: │
    │ - dietpi-config > Security Options > Change Passwords

Extra details

  • i allready change the passwords and get the same result

did you change the root user password, the global software password or both?

I change all the passwords

can you try following to set a new software password

rm /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin
/boot/dietpi/func/dietpi-set_software passwords

I get no such file or directory

/var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin

you tried it as user root? What about creating the password? Can you share the output?

/boot/dietpi/func/dietpi-set_software passwords
- Command: chown root:root /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin   │
│  - Exit code: 1                                                              │
│  - DietPi version: v8.13.2 (MichaIng/master) | HW_MODEL: 4 | HW_ARCH: 3 |    │
│ DISTRO: 6                                                                    │
│  - Image creator: DietPi Core Team                                           │
│  - Pre-image: from scratch                                                   │
│  - Error log:                                                                │
│ chown: cannot access '/var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin': No    │
│ such file or directory

here what i get.

can you try to create an empty one.

touch /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin
/boot/dietpi/func/dietpi-set_software passwords
WARNING: Concurrent execution of DietPi-Set_software detected
│
│ Please check if one of the following applies:
│  - This script already runs on another terminal/SSH session.
│  - Currently a cron or systemd background job executes the script.
│  - You started this script from within another DietPi program, causing a
│ loop.
│
│ Please assure that the concurrent execution has finished, before retrying,
│ otherwise cancel this instance.
│
│ The following info might help:
│     959 dietpi   pts/0         \_ -bash
│   44305 root     pts/0             \_ sudo
│ /boot/dietpi/func/dietpi-set_software passwords
│   44306 root     pts/0                 \_ /bin/bash
│ /boot/dietpi/func/dietpi-set_software passwords
│   47643 root     pts/0

reboot your system and try again.

It works but when i try to reinstall the ProFTPD i get the same error

| [FAILED] Unable to obtain your global software password │
│ │
│ The following fallback password will be used: │
│ - dietpi │
│ │
│ You can change it via: │
│ - dietpi-config > Security Options > Change Passwords

can you check for kernel error message?

dmesg -l err,crit,alert,emerg
[    0.517836] bcm2708_fb soc:fb: Unable to determine number of FBs. Disabling driver.
[    2.438083] sd 1:0:0:0: [sdb] Incomplete mode parameter data
[    2.438104] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[   10.241249] blk_update_request: I/O error, dev sdb, sector 2304 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0

some I/O errors. Do you know what is located on this device sdb?? Let’s check where it is mounted on

lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid
02d37b60-1b70-4b31-a78b-6617dc7caca9
sdb                7.5G  0 disk
└─sdb1
     vfat   USB-MOVIES
                   7.5G  0 part                                                 8E73-F5B6

any reason for not sharing the whole output?

Anyway, looks like the drive is connected by not mounted / used. Means not related to this issue.

Are you able to read content from password file? It should be a large number of numbers, letters and special characters.

cat /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin

No i can’t. Gives me no result

Blockquote
dietpi@DietPi:~$ sudo cat /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin dietpi@DietPi:~$

Blockquote

Means the file is empty? Can you check following

ls -la /var/lib/dietpi/dietpi-software/
dietpi@DietPi:~$ sudo ls -la /var/lib/dietpi/dietpi-software/
total 12
drwxr-xr-x 3 root root 4096 Feb  3 12:11 .
drwxr-xr-x 6 root root 4096 Jan 21 00:03 ..
-rw------- 1 root root    0 Feb  3 12:11 .GLOBAL_PW.bin
drwxr-xr-x 3 root root 4096 Sep 11 18:13 installed

ok still an empty file. Can you do following as user root pls.

openssl enc -e -a -md sha256 -aes-256-cbc -iter 10000 -salt -pass pass:'DietPiRocks!' -out /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin <<< "your.new.pasword"

This should write a new password to the file. Check that something is in.

cat /var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin