Error during update of webmin (usbmux)

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.5
Virtualmin version 7.1-1

In the last weeks I’ve been getting the same error during the updates. The same happened yesterday. The error log is listed below. Please help me identify the reason and how to fix it.

Now updating libjpeg-turbo8 libnss-systemd libpam-systemd libsystemd0 libudev1 systemd systemd-sysv systemd-timesyncd udev ..
Installing package(s) with command apt-get -y install libjpeg-turbo8 libnss-systemd libpam-systemd libsystemd0 libudev1 systemd systemd-sysv systemd-timesyncd udev ..

Setting up usbmuxd (1.1.1~git20191130.9af2b12-1) ...
Warning: The home dir /var/lib/usbmux you specified can't be accessed: No such file or directory
Adding system user `usbmux' (UID 121) ...
Adding new user `usbmux' (UID 121) with group `plugdev' ...
useradd: existing lock file /etc/passwd.lock with an invalid PID '1111703
'
useradd: cannot lock /etc/passwd; try again later.
adduser: `/sbin/useradd -d /var/lib/usbmux -g plugdev -s /usr/sbin/nologin -u 121 usbmux' returned error code 1. Exiting.
dpkg: error processing package usbmuxd (--configure):
 installed usbmuxd package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 usbmuxd
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  linux-headers-5.4.0-92 linux-headers-5.4.0-92-generic
  linux-image-5.4.0-92-generic linux-modules-5.4.0-92-generic
  linux-modules-extra-5.4.0-92-generic
Use 'apt autoremove' to remove them.
Suggested packages:
  systemd-container
The following packages will be upgraded:
  libjpeg-turbo8 libnss-systemd libpam-systemd libsystemd0 libudev1 systemd
  systemd-sysv systemd-timesyncd udev
9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 5959 kB of archives.
After this operation, 29.7 kB of additional disk space will be used.
Get:1 http://asi-fs-n.contabo.net/ubuntu focal-updates/main amd64 udev amd64 245.4-4ubuntu3.18 [1367 kB]
Get:2 http://asi-fs-n.contabo.net/ubuntu focal-updates/main amd64 libudev1 amd64 245.4-4ubuntu3.18 [76.3 kB]
Get:3 http://asi-fs-n.contabo.net/ubuntu focal-updates/main amd64 systemd-sysv amd64 245.4-4ubuntu3.18 [10.3 kB]
Get:4 http://asi-fs-n.contabo.net/ubuntu focal-updates/main amd64 systemd-timesyncd amd64 245.4-4ubuntu3.18 [28.1 kB]
Get:5 http://asi-fs-n.contabo.net/ubuntu focal-updates/main amd64 libnss-systemd amd64 245.4-4ubuntu3.18 [96.1 kB]
Get:6 http://asi-fs-n.contabo.net/ubuntu focal-updates/main amd64 libpam-systemd amd64 245.4-4ubuntu3.18 [186 kB]
Get:7 http://asi-fs-n.contabo.net/ubuntu focal-updates/main amd64 systemd amd64 245.4-4ubuntu3.18 [3808 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/main amd64 libjpeg-turbo8 amd64 2.0.3-0ubuntu1.20.04.3 [118 kB]
Get:9 http://asi-fs-n.contabo.net/ubuntu focal-updates/main amd64 libsystemd0 amd64 245.4-4ubuntu3.18 [269 kB]
[master 2f696ad] saving uncommitted changes in /etc prior to apt run
 5 files changed, 47 insertions(+), 2 deletions(-)
 delete mode 100644 letsencrypt/.certbot.lock
 create mode 100644 letsencrypt/csr/0608_csr-certbot.pem
 create mode 100644 letsencrypt/keys/0608_key-certbot.pem
Fetched 5959 kB in 1s (10.2 MB/s)
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 205437 files and directories currently installed.)
Preparing to unpack .../udev_245.4-4ubuntu3.18_amd64.deb ...
Unpacking udev (245.4-4ubuntu3.18) over (245.4-4ubuntu3.17) ...
Preparing to unpack .../libudev1_245.4-4ubuntu3.18_amd64.deb ...
Unpacking libudev1:amd64 (245.4-4ubuntu3.18) over (245.4-4ubuntu3.17) ...
Setting up libudev1:amd64 (245.4-4ubuntu3.18) ...
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 205437 files and directories currently installed.)
Preparing to unpack .../0-systemd-sysv_245.4-4ubuntu3.18_amd64.deb ...
Unpacking systemd-sysv (245.4-4ubuntu3.18) over (245.4-4ubuntu3.17) ...
Preparing to unpack .../1-systemd-timesyncd_245.4-4ubuntu3.18_amd64.deb ...
Unpacking systemd-timesyncd (245.4-4ubuntu3.18) over (245.4-4ubuntu3.17) ...
Preparing to unpack .../2-libnss-systemd_245.4-4ubuntu3.18_amd64.deb ...
Unpacking libnss-systemd:amd64 (245.4-4ubuntu3.18) over (245.4-4ubuntu3.17) ...
Preparing to unpack .../3-libpam-systemd_245.4-4ubuntu3.18_amd64.deb ...
Unpacking libpam-systemd:amd64 (245.4-4ubuntu3.18) over (245.4-4ubuntu3.17) ...
Preparing to unpack .../4-systemd_245.4-4ubuntu3.18_amd64.deb ...
Unpacking systemd (245.4-4ubuntu3.18) over (245.4-4ubuntu3.17) ...
Preparing to unpack .../5-libsystemd0_245.4-4ubuntu3.18_amd64.deb ...
Unpacking libsystemd0:amd64 (245.4-4ubuntu3.18) over (245.4-4ubuntu3.17) ...
Setting up libsystemd0:amd64 (245.4-4ubuntu3.18) ...
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 205437 files and directories currently installed.)
Preparing to unpack .../libjpeg-turbo8_2.0.3-0ubuntu1.20.04.3_amd64.deb ...
Unpacking libjpeg-turbo8:amd64 (2.0.3-0ubuntu1.20.04.3) over (2.0.3-0ubuntu1.20.04.1) ...
Setting up udev (245.4-4ubuntu3.18) ...
update-initramfs: deferring update (trigger activated)
Setting up usbmuxd (1.1.1~git20191130.9af2b12-1) ...
Warning: The home dir /var/lib/usbmux you specified can't be accessed: No such file or directory
Adding system user `usbmux' (UID 121) ...
Adding new user `usbmux' (UID 121) with group `plugdev' ...
useradd: existing lock file /etc/passwd.lock with an invalid PID '1111703
'
useradd: cannot lock /etc/passwd; try again later.
adduser: `/sbin/useradd -d /var/lib/usbmux -g plugdev -s /usr/sbin/nologin -u 121 usbmux' returned error code 1. Exiting.
dpkg: error processing package usbmuxd (--configure):
 installed usbmuxd package post-installation script subprocess returned error exit status 1
Setting up libjpeg-turbo8:amd64 (2.0.3-0ubuntu1.20.04.3) ...
Setting up systemd (245.4-4ubuntu3.18) ...
Setting up systemd-timesyncd (245.4-4ubuntu3.18) ...
Setting up systemd-sysv (245.4-4ubuntu3.18) ...
Setting up libnss-systemd:amd64 (245.4-4ubuntu3.18) ...
Setting up libpam-systemd:amd64 (245.4-4ubuntu3.18) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for dbus (1.12.16-2ubuntu2.2) ...
Processing triggers for initramfs-tools (0.136ubuntu6.7) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-126-generic
Errors were encountered while processing:
 usbmuxd
E: Sub-process /usr/bin/dpkg returned an error code (1)
.. install failed!

@ewanly,

Are you using any custom repos?

Have you tried “apt-get clean” and “apt-get check”?

*** Professional, Affordable, Trusted Technical Support https://tpnassist.com ***

Thank you for your reply!
Not really. Around a year ago I installed Virtualmin on this VPS to run WordPress website and emails. I’ve some other VPSs in the same settings, but I only encountered this problem in this one. All what I was doing was keep updating, thats all.

Your mentioned commands I never heard before but I used it now. You can see below:

root@web:~# apt-get check
Reading package lists... Done
Building dependency tree
Reading state information... Done

root@web:~# apt-get clean

root@web:~# sudo apt update
Hit:1 http://asi-fs-n.contabo.net/ubuntu focal InRelease
Get:2 http://asi-fs-n.contabo.net/ubuntu focal-updates InRelease [114 kB]
Get:3 http://asi-fs-n.contabo.net/ubuntu focal-backports InRelease [108 kB]
Hit:4 http://software.virtualmin.com/vm/6/gpl/apt virtualmin-focal InRelease
Hit:5 http://software.virtualmin.com/vm/6/gpl/apt virtualmin-universal InRelease
Get:6 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:7 http://asi-fs-n.contabo.net/ubuntu focal-updates/main amd64 Packages [2,11                                                  3 kB]
Get:8 http://asi-fs-n.contabo.net/ubuntu focal-updates/main i386 Packages [727 k                                                  B]
Get:9 http://asi-fs-n.contabo.net/ubuntu focal-updates/universe amd64 Packages [                                                  955 kB]
Get:10 http://asi-fs-n.contabo.net/ubuntu focal-updates/universe i386 Packages [                                                  693 kB]
Fetched 4,823 kB in 1s (3,324 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

root@web:~# sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.4.0-92 linux-headers-5.4.0-92-generic
  linux-image-5.4.0-92-generic linux-modules-5.4.0-92-generic
  linux-modules-extra-5.4.0-92-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
[master 9064a7b] saving uncommitted changes in /etc prior to apt run
 4 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 letsencrypt/csr/0609_csr-certbot.pem
 create mode 100644 letsencrypt/keys/0609_key-certbot.pem
Setting up usbmuxd (1.1.1~git20191130.9af2b12-1) ...
Warning: The home dir /var/lib/usbmux you specified can't be accessed: No such f                                                  ile or directory
Adding system user `usbmux' (UID 121) ...
Adding new user `usbmux' (UID 121) with group `plugdev' ...
useradd: existing lock file /etc/passwd.lock with an invalid PID '1111703
'
useradd: cannot lock /etc/passwd; try again later.
adduser: `/sbin/useradd -d /var/lib/usbmux -g plugdev -s /usr/sbin/nologin -u 12                                                  1 usbmux' returned error code 1. Exiting.
dpkg: error processing package usbmuxd (--configure):
 installed usbmuxd package post-installation script subprocess returned error ex                                                  it status 1
Errors were encountered while processing:
 usbmuxd
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@web:~#

root@web:~# sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-5.4.0-92 linux-headers-5.4.0-92-generic linux-image-5.4.0-92-generic linux-modules-5.4.0-92-generic
  linux-modules-extra-5.4.0-92-generic
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 380 MB disk space will be freed.
Do you want to continue? [Y/n]
[master b9c2a9a] saving uncommitted changes in /etc prior to apt run
 1 file changed, 1 insertion(+), 1 deletion(-)
(Reading database ... 205434 files and directories currently installed.)
Removing linux-headers-5.4.0-92-generic (5.4.0-92.103) ...
Removing linux-headers-5.4.0-92 (5.4.0-92.103) ...
Removing linux-modules-extra-5.4.0-92-generic (5.4.0-92.103) ...
Removing linux-image-5.4.0-92-generic (5.4.0-92.103) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.4.0-92-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-126-generic
Found initrd image: /boot/initrd.img-5.4.0-126-generic
Found linux image: /boot/vmlinuz-5.4.0-125-generic
Found initrd image: /boot/initrd.img-5.4.0-125-generic
done
Removing linux-modules-5.4.0-92-generic (5.4.0-92.103) ...
Setting up usbmuxd (1.1.1~git20191130.9af2b12-1) ...
Warning: The home dir /var/lib/usbmux you specified can't be accessed: No such file or directory
Adding system user `usbmux' (UID 121) ...
Adding new user `usbmux' (UID 121) with group `plugdev' ...
useradd: existing lock file /etc/passwd.lock with an invalid PID '1111703
'
useradd: cannot lock /etc/passwd; try again later.
adduser: `/sbin/useradd -d /var/lib/usbmux -g plugdev -s /usr/sbin/nologin -u 121 usbmux' returned error code 1. Exiting.
dpkg: error processing package usbmuxd (--configure):
 installed usbmuxd package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 usbmuxd
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@web:~#



@ewanly,

Looks like the installer is having trouble get a lock on some key files /etc/passwd so it’s failing.

When was the last reboot? Try this, and see if that resolves things. An existing lock on the above file may just be stuck.

BTW, on a side note it would be a good idea to also run sudo apt-get autoremove which will remove old software your system doesn’t need anymore. Notable from what you provided there’s an old kernel which is no longer needed. This will free up disk space.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.