Вот настройка:
Код: Выделить всё
dnessett@homelserv:~$ cd SaltSource/
dnessett@homelserv:~/SaltSource$ cd scripts/
dnessett@homelserv:~/SaltSource/scripts$ ls -al
total 12
drwxrwxr-x 2 dnessett dnessett 4096 Oct 1 13:51 .
drwxrwxr-x 4 dnessett dnessett 4096 Oct 1 13:49 ..
-rwxrwxrwx 1 dnessett dnessett 29 Oct 1 13:51 python_on_root.sh
dnessett@homelserv:~/SaltSource/scripts$
dnessett@homelserv:~/SaltSource/scripts$ cat python_on_root.sh
#!/bin/bash
sudo python "$@"
dnessett@homelserv:/etc$ sudo cat sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
Defaults use_pty
...
#add python to sudo list
dnessett homelserv=(root)NOPASSWD:/home/dnessett/.pyenv/versions/3.10.15/bin/python
# See sudoers(5) for more information on "@include" directives:
@includedir /etc/sudoers.d
Когда я попытался добавить скрипт в список интерпретаторов проекта,

Я получил следующее сообщение об ошибке:
[img]https://i .sstatic.net/GkLxVoQE.png[/img]
Кто-нибудь видит, что я делаю неправильно?
Подробнее здесь: https://stackoverflow.com/questions/790 ... un-as-root