The officially official Devuan Forum!

You are not logged in.

#1 Today 16:37:15

kapqa
Member
Registered: 2019-01-02
Posts: 831  

(iperf3) insecure directory in $ENV {PATH} while running -T switch

Hello ,

today checking out older and newer computer
upgrading devuan packages etc.

bit pleasant surprised how well core2duo and athlon still can function,
but since i am ditching LED lights wherever i can
am not opposed to more energy-saving computers, provided they feature a fairly open-minded set.

on this 3200G (65Watt-ish)
with Devuan 6 receving this error when propeearing for package "hardinfo2"

Unpacking hardinfo2 (2.3.0) ...
dpkg: dependency problems prevent configuration of hardinfo2:
 hardinfo2 depends on iperf3; however:
  Package iperf3 is not installed.

dpkg: error processing package hardinfo2 (--install):
 dependency problems - leaving unconfigured
sudo apt -f install
Correcting dependencies... Done 
The following packages were automatically installed and are no longer required:
  chromium-sandbox  librnp0  libsexpp0  linux-image-6.1.0-44-amd64
Use 'sudo apt autoremove' to remove them.

Installing dependencies:
  iperf3

Summary:
  Upgrading: 0, Installing: 1, Removing: 0, Not Upgrading: 1
  1 not fully installed or removed.
  Download size: 0 B / 37.3 kB
  Space needed: 92.2 kB / 33.9 GB available

Continue? [Y/n] 
Preconfiguring packages ...
Selecting previously unselected package iperf3.
(Reading database ... 358262 files and directories currently installed.)
Preparing to unpack .../iperf3_3.18-2+deb13u2_amd64.deb ...
Unpacking iperf3 (3.18-2+deb13u2) ...
Setting up iperf3 (3.18-2+deb13u2) ...
Stopping iperf3 daemon: iperf3.
Insecure directory in $ENV{PATH} while running with -T switch at /usr/share/perl
5/Debian/AdduserLogging.pm line 161.
dpkg: error processing package iperf3 (--configure):
 installed iperf3 package post-installation script subprocess returned error exi
t status 25
dpkg: dependency problems prevent configuration of hardinfo2:
 hardinfo2 depends on iperf3; however:
  Package iperf3 is not configured yet.

dpkg: error processing package hardinfo2 (--configure):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.13.1-1) ...
Errors were encountered while processing:
 iperf3
 hardinfo2

have not encountered this error before since the packages would regularly install fairly without issues;

thank you.

Linux devuan 6.12.94+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.94-1 (2026-06-20) x86_64 GNU/Linux

Last edited by kapqa (Today 16:38:07)

Offline

#2 Today 17:26:39

kaiyel
Member
Registered: 2019-10-16
Posts: 45  

Re: (iperf3) insecure directory in $ENV {PATH} while running -T switch

Is there anything customized in the environment PATH variable?

# env | grep ^PATH
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

--K

Online

#3 Today 18:55:17

kapqa
Member
Registered: 2019-01-02
Posts: 831  

Re: (iperf3) insecure directory in $ENV {PATH} while running -T switch

PATH=/home/test/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

Last edited by kapqa (Today 18:59:16)

Offline

#4 Today 19:14:16

kaiyel
Member
Registered: 2019-10-16
Posts: 45  

Re: (iperf3) insecure directory in $ENV {PATH} while running -T switch

Instead of installing directly via sudo, try using sudo to become root and install from root's environment :

sudo su - root
env | grep ^PATH
apt-get install -y iperf3

I suspect the iperf3 installer is auditing folder permissions along PATH and finding something unpalatable.

Hope this helps,
--K

Online

#5 Today 19:19:44

kapqa
Member
Registered: 2019-01-02
Posts: 831  

Re: (iperf3) insecure directory in $ENV {PATH} while running -T switch

thank you,
very helpful;
i amay have installed a game of old via crossover;

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
root@devuan:~# apt-get install -y iperf3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
iperf3 is already the newest version (3.18-2+deb13u2).
iperf3 set to manually installed.
The following packages were automatically installed and are no longer required:
  chromium-sandbox librnp0 libsexpp0
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up iperf3 (3.18-2+deb13u2) ...
Stopping iperf3 daemon: iperf3.
Insecure directory in $ENV{PATH} while running with -T switch at /usr/share/perl5/Debian/AdduserLogging.pm line 161.
dpkg: error processing package iperf3 (--configure):
 installed iperf3 package post-installation script subprocess returned error exit status 25
Setting up geoclue-2.0 (2.7.2-2) ...
Insecure directory in $ENV{PATH} while running with -T switch at /usr/share/perl5/Debian/AdduserLogging.pm line 161.
dpkg: error processing package geoclue-2.0 (--configure):
 installed geoclue-2.0 package post-installation script subprocess returned error exit status 25
Errors were encountered while processing:
 iperf3
 geoclue-2.0
E: Sub-process /usr/bin/dpkg returned an error code (1)

edit:
maybe it helps remove those /games listing from PATH listing? could you please show to do it? thanks.

Last edited by kapqa (Today 19:40:14)

Offline

#6 Today 20:09:38

kapqa
Member
Registered: 2019-01-02
Posts: 831  

Re: (iperf3) insecure directory in $ENV {PATH} while running -T switch

it seems there are more error still involved

REMOVING:
  pipewire:i386*

Summary:
  Upgrading: 0, Installing: 0, Removing: 1, Not Upgrading: 0
  1 not fully installed or removed.
  Space needed: 0 B / 44.2 GB available

Continue? [Y/n] 
dpkg: dependency problems prevent configuration of libpam-elogind:i386:
 libpam-elogind:amd64 (255.17-2) breaks libpam-systemd and is installed.
  libpam-elogind:i386 (255.17-2) provides libpam-systemd.

dpkg: error processing package libpam-elogind:i386 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libpam-elogind:i386

it seems the crossover/wine has installed the pipewire:i386  and pulseaudio:i386 hence breaking the audio-setup;
now the error is recovered (removing libpam-elogind:i386, however the above error remains (§Insecure directory in $ENV{PATH} while running with -T switch at /usr/share/perl
5/Debian/AdduserLogging.pm line 161. mybe connected with PATH:/usr/local/games:/usr/games???)

Last edited by kapqa (Today 20:20:07)

Offline

#7 Today 20:59:26

Mercury
Member
Registered: 2024-11-14
Posts: 88  

Re: (iperf3) insecure directory in $ENV {PATH} while running -T switch

Used Gemini (AI assistance) for to search for solutions to this problem.

/usr/share/perl5/Debian/AdduserLogging.pm is a Perl module provided by the adduser package in Debian-based Linux distributions (such as Debian 13 Trixie, Ubuntu, and Proxmox). It handles logging operations when creating or modifying system users and groups

Recent versions of adduser run Perl with the -T (taint) flag enabled for security. Before executing external commands (such as logger), Perl strictly checks your $PATH environment variable. It will abort if:
• World-writable directories. A directory listed in your $PATH is writable by all users (e.g., drwxrwxrwx / 0777 permissions).
• Relative paths. Your $PATH contains relative entries like . (the current directory) or empty entries (::).
• Inherited Windows paths (WSL). If you are running Debian/Ubuntu inside Windows Subsystem for Linux (WSL), Windows directories mounted with open permissions are automatically appended to your Linux $PATH.

So probably something in your $PATH is world-writable, which is considered insecure.

Check directory permissions:
echo "$PATH" | tr ':' '\n' | xargs -r ls -ld

Inject a clean PATH while running apt:
sudo PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin apt-get install -f

Online

#8 Today 21:07:15

kaiyel
Member
Registered: 2019-10-16
Posts: 45  

Re: (iperf3) insecure directory in $ENV {PATH} while running -T switch

Odd ... I just spun up an excalibur and installed iperf3 successfully.

The error message "Insecure directory in $ENV{PATH} while running with -T switch at /usr/share/perl
5/Debian/AdduserLogging.pm line 161.
" points to Perl running with "taint" mode enabled while adding the "iperf3" user, which makes me suspect there is a directory in PATH that is either not owned by root:root or has go+w permissions.

Run this as root

bash -c 'IFS=:; for d in $PATH; do [ -d "$d" ] && ls -ld "$d"; done'

Look for any "d"irectories listed that are not owned by "root:root" or have 777 or 775 permissions.

These are the results from my excalibur spin :

# bash -c 'IFS=:; for d in $PATH; do [ -d "$d" ] && ls -ld "$d"; done'
drwxr-xr-x 2 root root 4096 Nov  9 22:44 /usr/local/sbin
drwxr-xr-x 2 root root 4096 Nov  9 22:44 /usr/local/bin
drwxr-xr-x 2 root root 20480 Nov 15 17:54 /usr/sbin
drwxr-xr-x 2 root root 69632 Nov 19 07:46 /usr/bin
lrwxrwxrwx 1 root root 8 Nov  9 22:44 /sbin -> usr/sbin
lrwxrwxrwx 1 root root 7 Nov  9 22:44 /bin -> usr/bin

If your output resembles this above, you should be able to force apt to finish configuring the unpacked iperf3 package by overriding the PATH inline, again as root :

env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin dpkg --configure -a

--K

Online

Board footer