You are not logged in.
I get this output when I run pacman with PATH having /bin or /sbin
$ sudo pacman
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named siteThis error started happening after I pasted this in my profile and continued happening even after removing this and uninstalling pyenv
export PYENV_ROOT="$HOME/.local/pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"Last edited by yogansh (2023-10-21 17:08:14)
Offline
type -a pacman
Offline
$ type -a pacman
pacman is /sbin/pacman
pacman is /bin/pacman
pacman is /usr/bin/pacman
pacman is /usr/sbin/pacmanLast edited by yogansh (2023-10-21 17:11:09)
Offline
Everything seems to be fine if I set PATH to /usr/bin
$ PATH="/usr/bin" sudo pacman --version
.--. Pacman v6.0.2 - libalpm v13.0.2
/ _.-' .-. .-. .-. Copyright (C) 2006-2021 Pacman Development Team
\ '-. '-' '-' '-' Copyright (C) 2002-2006 Judd Vinet
'--'
This program may be freely redistributed under
the terms of the GNU General Public License.Offline
wait, I bet it sudo, not pacman. type -a sudo.
Offline
wait, I bet it sudo, not pacman. type -a sudo.
$ type -a sudo
sudo is /sbin/sudo
sudo is /bin/sudo
sudo is /usr/bin/sudo
sudo is /usr/sbin/sudoYes, It seems like it is sudo.
$ sudo ls
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named siteLast edited by yogansh (2023-10-22 04:30:39)
Offline
/sbin , /bin and /usr/sbin are supposed to be symlinks , it looks like they are regular folders on your system .
Please post the output of
ls -l /usr/sbin /bin /sbinDisliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
/sbin , /bin and /usr/sbin are supposed to be symlinks , it looks like they are regular folders on your system .
Please post the output of
ls -l /usr/sbin /bin /sbin
$ ls -l /usr/sbin /bin /sbin
lrwxrwxrwx 1 root root 7 Sep 18 18:48 /bin -> usr/bin
lrwxrwxrwx 1 root root 7 Sep 18 18:48 /sbin -> usr/bin
lrwxrwxrwx 1 root root 3 Sep 18 18:48 /usr/sbin -> binOffline
I was using Howdy. Removing this line from /etc/pam.d/sudo solved this
auth sufficient pam_python.so /lib/security/howdy/pam.pyBut I still want to continue using howdy.
Offline
auth sufficient pam_python.so /lib/security/howdy/pam.pyBut I still want to continue using howdy.
You do not consider it a vulnerability that by adjusting $PATH you control the interpreter that loads /lib/security/howdy/pam.py and therefore can control the result from /lib/security/howdy/pam.py by using a specially crafted executable?
Offline
You do not consider it a vulnerability that by adjusting $PATH you control the interpreter that loads /lib/security/howdy/pam.py and therefore can control the result from /lib/security/howdy/pam.py by using a specially crafted executable?
That is how the arch wiki does it https://wiki.archlinux.org/title/Howdy# … hen_needed
Offline
loqs wrote:You do not consider it a vulnerability that by adjusting $PATH you control the interpreter that loads /lib/security/howdy/pam.py and therefore can control the result from /lib/security/howdy/pam.py by using a specially crafted executable?
That is how the arch wiki does it https://wiki.archlinux.org/title/Howdy# … hen_needed
Does that mean because it is in the Arch wiki you do not consider it to be a security issue?
Offline
Note: When using Howdy 3.0.0 BETA and above (howdy-beta-gitAUR), the line should be:
auth sufficient /lib/security/pam_howdy.so
I'd look into that instead…
Offline
Also are you using https://aur.archlinux.org/packages/pam-python-git as https://aur.archlinux.org/packages/pam-python depends on python2?
Offline
Oh, and to defend the wiki: it doesn't say anything about adding that to sudo and your ability to impact the interpreter path before logging in is rather limited.
Offline
If you want to use something that relies on the system python, how about not completely overriding the system python?
Offline