Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see:
viewtopic.php?t=158230
User discussion about Debian Development, Debian Project News and Announcements. Not for support questions.
postcd
Posts: 133 Joined: 2022-01-08 18:33
Has thanked: 48 times
Been thanked: 2 times
#1
Post
by postcd » 2022-02-18 21:37
Hello,
$ echo $PATH
Code: Select all
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
The traffictoll installed by "pip3 install traffictoll"
failed to work because it could not access tc (/usr/sbin/tc)
So i did:
Code: Select all
export PATH=$PATH:/usr/sbin:/home/$(whoami)/.local/bin
echo "export PATH=$PATH:/usr/sbin:/home/$(whoami)/.local/bin" >> ~/.bashrc
Is it correct that it is not included or i or some app accidentally removed /usr/sbin from PATH?
p.H
Global Moderator
Posts: 3049 Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times
#2
Post
by p.H » 2022-02-18 21:46
/sbin and /usr/sbin are not in normal users' $PATH, only in root's $PATH.
craigevil
Posts: 5393 Joined: 2006-09-17 03:17
Location: heaven
Has thanked: 28 times
Been thanked: 39 times
#3
Post
by craigevil » 2022-02-19 00:31
I added this to my bashrc
Code: Select all
# Fix PATH
PATH=$PATH:/home/pi/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/pi/.local/bin:
Raspberry PI 400 Distro: Raspberry Pi OS Base: Debian Sid Kernel: 5.15.69-v8+ aarch64 DE: MATE Ram 4GB
Debian - "If you can't apt install something, it isn't useful or doesn't exist"
My Giant Sources.list
reinob
Posts: 1198 Joined: 2014-06-30 11:42
Has thanked: 100 times
Been thanked: 47 times
#4
Post
by reinob » 2022-02-19 14:13
@postcd,
You do realize that "tt has to be run as root" (from
https://github.com/cryzed/TrafficToll ).
/sbin, /usr/sbin and /usr/local/sbin will be in root's PATH,
(if you run your command with sudo or become root using "su -" or just login as root, depending on your config.)
fuzzyeric
Posts: 1 Joined: 2022-09-17 03:07
#5
Post
by fuzzyeric » 2022-09-17 03:11
Seems to be problematic for PAM_mount, particularly pmvarrun.
fuzzy@client0008 ~ $ sudo -i
[sudo] password for fuzzy:
HXproc_run_async: pmvarrun: No such file or directory
root@client0008:~# whereis pmvarrun
pmvarrun: /usr/sbin/pmvarrun /usr/share/man/man8/pmvarrun.8.gz
root@client0008:~# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
root@client0008:~# exit
logout
HXproc_run_async: pmvarrun: No such file or directory
fuzzy@client0008 ~ $ echo $PATH
/home/fuzzy/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
fuzzy@client0008 ~ $
jmgibson1981
Posts: 308 Joined: 2015-06-07 14:38
Has thanked: 11 times
Been thanked: 36 times
#6
Post
by jmgibson1981 » 2022-09-17 04:28
Code: Select all
$ head -n 1 /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/share/games:/opt/kodimatrix/bin"
I get lazy. I don't see a problem with this. If it needs root it will demand it anyway so it will still require authentication. Saves me from having to remember which ones I can and can't do.
Head_on_a_Stick
Posts: 14114 Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times
#7
Post
by Head_on_a_Stick » 2022-09-17 10:07
fuzzyeric wrote: ↑ 2022-09-17 03:11
Seems to be problematic for PAM_mount, particularly pmvarrun.
fuzzy@client0008 ~ $ sudo -i
[sudo] password for fuzzy:
HXproc_run_async: pmvarrun: No such file or directory
root@client0008:~# whereis pmvarrun
pmvarrun: /usr/sbin/pmvarrun /usr/share/man/man8/pmvarrun.8.gz
root@client0008:~# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
root@client0008:~# exit
logout
HXproc_run_async: pmvarrun: No such file or directory
fuzzy@client0008 ~ $ echo $PATH
/home/fuzzy/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
fuzzy@client0008 ~ $
Using sudo should add /usr/sbin/ to PATH:
Code: Select all
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
$ sudo -i
# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
#
Can we see
EDIT: disregard, see below.
Last edited by
Head_on_a_Stick on 2022-09-17 10:24, edited 1 time in total.
deadbang
p.H
Global Moderator
Posts: 3049 Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times
#8
Post
by p.H » 2022-09-17 10:20
Head_on_a_Stick wrote: ↑ 2022-09-17 10:07
Using sudo should add /usr/sbin/ to PATH
It does:
fuzzyeric wrote: ↑ 2022-09-17 03:11
root@client0008:~# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
But I guess it happens after PAM stuff.