The officially official Devuan Forum!

You are not logged in.

#1 Yesterday 16:37:15

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

[SOLVED] (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 (Yesterday 16:38:07)

Offline

#2 Yesterday 17:26:39

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

Re: [SOLVED] (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 Yesterday 18:55:17

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

Re: [SOLVED] (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 (Yesterday 18:59:16)

Offline

#4 Yesterday 19:14:16

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

Re: [SOLVED] (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 Yesterday 19:19:44

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

Re: [SOLVED] (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 (Yesterday 19:40:14)

Offline

#6 Yesterday 20:09:38

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

Re: [SOLVED] (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 (Yesterday 20:20:07)

Offline

#7 Yesterday 20:59:26

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

Re: [SOLVED] (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

Offline

#8 Yesterday 21:07:15

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

Re: [SOLVED] (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

#9 Today 08:21:48

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

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

@kayel

am suspedcting that it is a boteched installation, since used sometimes to install via -usb-stick and had less luck than via dvd; however newer excalibur is more difficult to install from dvd with secure-boot, so need to deactivate secure-boot prior to install from dvd, and then reactivate after install d one; not sure if this is correct, but afterwards, t seems the install is more secure than when done from usb (ventoy=)?

anyway, have differnt output here

drwxr-xr-x 2 root root 4096 Jun 25  2025 /usr/local/sbin
drwxr-xr-x 2 root root 4096 Jul  1 21:53 /usr/local/bin
drwxr-xr-x 2 root root 20480 Nov 23 17:16 /usr/sbin
drwxrwxrwx 2 rich rich 122880 Nov 23 21:16 /usr/bin
lrwxrwxrwx 1 root root 8 Jul  1 19:56 /sbin -> usr/sbin
lrwxrwxrwx 1 root root 7 Jul  1 19:56 /bin -> usr/bin

and @mercury,
have deleted the games folder, to no effect.

echo "$PATH" | tr ':' '\n' | xargs -r ls -ld
ls: cannot access '/usr/local/games': No such file or directory
ls: cannot access '/usr/games': No such file or directory
lrwxrwxrwx 1 root root      7 Jul  1 19:56 /bin -> usr/bin
drwxr-xr-x 2 rich rich   4096 Nov  7  2025 /home/rich/.local/bin
drwxrwxrwx 2 rich rich 122880 Nov 23 21:16 /usr/bin
drwxr-xr-x 2 root root   4096 Jul  1 21:53 /usr/local/bin

edit: the "harfinfo2" has been attempted to install from here, but it never made a difference, meaning it always installed fine /(note package is listed for devuan5, but it installs also on devuan 6/7)
https://hardinfo2.org/download

Last edited by kapqa (Today 08:27:00)

Offline

#10 Today 08:36:01

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

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

so the grok-bot (sometimes wokey)
helped what you already allueded to

This is a known issue on Devuan 6 (Excalibur) / recent Debian derivatives. It happens because iperf3’s postinst script calls adduser (to create the system user/group), and modern adduser runs Perl in taint mode (-T). Perl then refuses to proceed if any directory in $PATH is considered insecure (world-writable, group-writable in certain cases, relative paths, empty entries, etc.).The exact same error (including the hardinfo2 dependency failure) was reported on the Devuan forums very recently.

Yes — that’s the problem./usr/bin must be owned by root:root and normally has permissions 755 (drwxr-xr-x). Having it owned by rich:rich with 777 is a serious misconfiguration and is exactly what triggers Perl’s taint-mode check in adduser.

Fix it (as root)

chown root:root /usr/bin
chmod 755 /usr/bin
env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin dpkg --configure -a

Offline

#11 Today 16:34:01

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

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

@kapqa,

Yes :-)  You found the culprit :

drwxrwxrwx 2 rich rich 122880 Nov 23 21:16 /usr/bin

And fixed it correctly.

However, a change like having the entire /usr/bin directory given end-user ownership and privileged to allow sweeping changes from all users is extremely unusual and more than a bit dangerous.  Unless you can track back the change to a specific finger-fumble or experiment that can be safely and entirely undone, I would highly recommend a detailed audit of the entire system, or ... back up the data, wipe it, and start fresh.

Glad to hear you have it sorted :-)
--K

Online

Board footer