linux 加用户到 sudo

  • 用docker启动报错
[docker@iZuf6gl8wxyasxnj79v1g2Z ~]$ sudo service docker start

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for docker: 
docker is not in the sudoers file.  This incident will be reported.
  • 登录root,编辑文件,加用户docker到sudo文件
[root@iZuf6gl8wxyasxnj79v1g2Z docker]# visudo
  • 增加用户
docker ALL=(ALL)    ALL

具体位置,截图如下
image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。