配置Eclipse/PyDev调试需Root权限应用时遇错误求助
问题:使用Eclipse/PyDev调试需Root权限的Python应用时遇配置错误
我希望用Eclipse/PyDev调试一个必须以Root权限运行的应用,跟着Stack Overflow上的《Debugging project with root in PyDev/LiClipse》教程里的第二个答案操作,但遇到了问题——当尝试将指定脚本设置为项目解释器时,Eclipse抛出了错误。
我的配置信息
脚本文件详情
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 "$@"
sudoers文件配置
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
注:我修改了sudoers文件,将条目绑定到机器名而非"ALL"。
当我尝试将python_on_root.sh脚本添加到项目解释器列表时(见截图),出现了错误信息(见截图)。
有人能指出我哪里操作有误吗?
内容的提问来源于stack exchange,提问作者dnessett
相关产品推荐
相关产品推荐

