我希望我的VPN登录到我的用户帐户后在启动时运行。当前正在运行Ubuntu 15.10。我已经将程序添加到启动(/ usr / bin / mullvad); 但是,它要求在打开之前进行身份验证。
“需要身份验证才能以超级用户身份运行'usr / bin / mtunnel'”
我已将这些条目添加到我的sudoers文件中,但似乎没有任何作用。我仍然需要输入密码才能运行我的VPN。
john ALL=(ALL) NOPASSWD: /usr/bin/mtunnel
john ALL=(ALL) NOPASSWD: /usr/bin/mullvad
任何的想法?
完整档案
#
# 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:$
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
john ALL=(ALL) NOPASSWD: /usr/bin/mtunnel, /usr/bin/mullvad
为什么登录时如此坚持连接VPN?您可以在引导时启动它,然后可以root
在通常的启动过程中执行VPN连接。
您可以通过无数种不同的方式来完成此操作:您可以在上添加一行/etc/rc.local
,您可以围绕该行构建服务(但具体取决于您是否在SysV
或之下systemd
),或者,更容易地,您可以将以下行放入
@reboot /usr/bin/mullvad
在crontab
。那就没有更多的密码了。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句