简体   繁体   English

如何永久授予用户 sudo 访问权限?

[英]How can I permanently grant sudo access to a user?

I created a service to automaticle initialize some scripts for me, but when I try to run, they do not work very well... keep asking my sudo password.我创建了一个服务来为我自动初始化一些脚本,但是当我尝试运行时,它们不能很好地工作......不断询问我的 sudo 密码。

I tried to add my user on sudors with sudo visudo, but nothing changed.我尝试使用 sudo visudo 在 sudors 上添加我的用户,但没有任何改变。

My commands:我的命令:

sudo visudo
--changing the file
vitor ALL=(ALL) NOPASSWD:ALL
ctrl+x
y

@Vitor Felipe @维托·费利佩

your addition should work fine.您的添加应该可以正常工作。

You have to start a new shell (a new terminal), or in some cases, logout and log back into your graphical environment, in order for the visudo changes to take effect.您必须启动一个新的 shell(一个新的终端),或者在某些情况下,注销并重新登录到您的图形环境,以使 visudo 更改生效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM