base-passwd configure fails after upgrade to 24.04

Asked by schhub

During upgrade from 22.04 LTS to 24.04 LTS ubuntu server i got this message

Debconf interaction failed
dpkg: error processing package base-passwd (--configure)
base-passwd package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: base-passwd

In /var/log/dist-upgrade/main.log i found :

ERROR got an error from dpkg for pkg: 'base-passwd': 'le sous-processus paquet base-passwd script post-installation installé a renvoyé un état de sortie d'erreur 1'
DEBUG running apport_pkgfailure() base-passwd: le sous-processus paquet base-passwd script post-installation installé a renvoyé un état de sortie d'erreur 1
ERROR Exception during pm.DoInstall()
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-xkfg4_3l/DistUpgrade/DistUpgradeView.py", line 220, in run
    res = pm.do_install(self.writefd)
apt_pkg.Error: E:Sub-process /usr/bin/dpkg returned an error code (1)
ERROR SystemError from cache.commit(): installArchives() failed
ERROR found exception: 'E:Sub-process /usr/bin/dpkg returned an error code (1)'

Tried dpkg --configure -a and got :
dpkg: des problèmes de dépendances empêchent la configuration de php-imagick :
 php-imagick dépend de php8.3-imagick; cependant :
  Le paquet php8.3-imagick n'est pas installé.

dpkg: erreur de traitement du paquet php-imagick (--configure) :
 problèmes de dépendances - laissé non configuré
Paramétrage de base-passwd (3.6.3build1) ...
Debconf interaction failed
dpkg: erreur de traitement du paquet base-passwd (--configure) :
 le sous-processus paquet base-passwd script post-installation installé a renvoyé un état de sortie d'erreur 1
Des erreurs ont été rencontrées pendant l'exécution :
 php-imagick
 base-passwd

tried apt update && apt upgrade and got :
...
E: Dépendances non satisfaites. Essayez « apt --fix-broken install » sans paquet
   (ou indiquez une solution).

tried apt --fix-broken install and got :

...
Paramétrage de base-passwd (3.6.3build1) ...
Debconf interaction failed
dpkg: erreur de traitement du paquet base-passwd (--configure) :
 le sous-processus paquet base-passwd script post-installation installé a renvoyé un état de sortie d'erreur 1
Des erreurs ont été rencontrées pendant l'exécution :
 base-passwd
E: Sub-process /usr/bin/dpkg returned an error code (1)

seems i'm in a never ending loop .

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu base-passwd Edit question
Assignee:
No assignee Edit question
Solved by:
schhub
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

For diagnostic purposes please provide the output that you receive for the following commands (to be executed in a terminal window):

uname -a
lsb_release -crid
LANG=C apt policy base-password python3-distupgrade

Revision history for this message
schhub (schhub) said :
#2

Here are the results of

uname -a :

#Server-name# 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -crid :

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: noble

LANG=C apt policy base-password python3-distupgrade :

python3-distupgrade:
  Installed: 1:24.04.19
  Candidate: 1:24.04.19
  Version table:
 *** 1:24.04.19 500
        500 http://fr.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages
        500 http://fr.archive.ubuntu.com/ubuntu noble-updates/main i386 Packages
        100 /var/lib/dpkg/status
     1:24.04.16 500
        500 http://fr.archive.ubuntu.com/ubuntu noble/main amd64 Packages
        500 http://fr.archive.ubuntu.com/ubuntu noble/main i386 Packages
N: Unable to locate package base-password

Revision history for this message
schhub (schhub) said :
#3

did also this :

 LANG=C apt policy base-passwd python3-distupgrade :

base-passwd:
  Installed: 3.6.3build1
  Candidate: 3.6.3build1
  Version table:
 *** 3.6.3build1 500
        500 http://fr.archive.ubuntu.com/ubuntu noble/main amd64 Packages
        100 /var/lib/dpkg/status
python3-distupgrade:
  Installed: 1:24.04.19
  Candidate: 1:24.04.19
  Version table:
 *** 1:24.04.19 500
        500 http://fr.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages
        500 http://fr.archive.ubuntu.com/ubuntu noble-updates/main i386 Packages
        100 /var/lib/dpkg/status
     1:24.04.16 500
        500 http://fr.archive.ubuntu.com/ubuntu noble/main amd64 Packages
        500 http://fr.archive.ubuntu.com/ubuntu noble/main i386 Packages

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

I am sorry for my error in the command, but you corrected it perfectly.

What output do you now receive for the command

LANG=C sudo dpkg --audit

Did you already reboot since you got the first failure message?

Revision history for this message
schhub (schhub) said :
#5

LANG=C sudo dpkg --audit gives :

The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 php-imagick Provides a wrapper to the ImageMagick library

The following packages are only half configured, probably due to problems
configuring them the first time. The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 base-passwd Debian base system master password and group files

Yes i rebooted five times since.

Immediatly after boot i see this :

Welcome to Ubuntu 24.04 LTS (GNU/Linux 5.15.0-118-generic x86_64)

 * Documentation: https://help.ubuntu.com
 * Management: https://landscape.canonical.com
 * Support: https://ubuntu.com/pro

 System information as of sam. 24 août 2024 15:18:11 CEST

La maintenance de sécurité étendue pour Applications n'est pas activée.

1260 mises à jour peuvent être appliquées immédiatement.
Pour afficher ces mises à jour supplémentaires, exécuter : apt list --upgradable

51 additional security updates can be applied with ESM Apps.
Learn more about enabling ESM Apps service at https://ubuntu.com/esm

The list of available updates is more than a week old.
To check for new updates run: sudo apt update
You have new mail.
Last login: Thu Aug 22 13:35:27 2024 from fe80::e51c:1aa0:f0aa:7b74%bond0

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

I still have no clue, what the root cause of your problem is.
I want to suggest the following step with the hope to get more insight:

Open a terminal window and issue the command

sudo nano /var/lib/dpkg/info/base-passwd.postinst

(or use any other text editor of your choice)

In the editor window that opens change the third line from
set -e
to
set -e +x

save the file and close the editor and finally execute the command

sudo dpkg --configure -a

What output do you receive?

Revision history for this message
schhub (schhub) said (last edit ):
#7

finaly i found in /tmp directory a tmp.KC3yHIatcr file generated by dpkg --configure -a and containing somtehing about

Removing group "DOMAINNAME\Domain Admins" (4)
Would commit 1 changes

So i saved my /etc/group file and removed the line inside about DOMAINNAME\Domain Admins

and after that the dpkg --configure -a went well !

after that the apt --fix-broken install could also be executed with success

on the way with apt update and apt upgrade, hope all goes well now

Revision history for this message
schhub (schhub) said :
#8

seems i've still wrong dependencies problems

Revision history for this message
schhub (schhub) said (last edit ):
#9

forced install of gnustep-base-runtime as it had depedency issues and after this i could upgrade.

Many thanks for your help.

By the way , setting
set -e +x in /var/lib/dpkg/info/base-passwd.postinst didn't change the previous issue, output was still

Paramétrage de base-passwd (3.6.3build1) ...
Debconf interaction failed
dpkg: erreur de traitement du paquet base-passwd (--configure) :
 le sous-processus paquet base-passwd script post-installation installé a renvoyé un état de sortie d'erreur 1
Des erreurs ont été rencontrées pendant l'exécution :
 base-passwd
E: Sub-process /usr/bin/dpkg returned an error code (1).