欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

添加到sudo组

程序员文章站 2022-07-14 21:27:17
...
[email protected]:~# adduser hduser sudo  
Adding user `hduser' to group `sudo' ...  
Adding user hduser to group sudo  
Done.  

为了防止以后用hduser使用sudo时候遇到如下错误:

hduser is not in the sudoers file.  This incident will be reported.  

需要用visudo命令编辑文件/etc/sudoers, 添加一行

# Uncomment to allow members of group sudo to not need a password  
# %sudo ALL=NOPASSWD: ALL  
hduser ALL=(ALL) ALL  

 

转载于:https://my.oschina.net/sniperLi/blog/853429