美文网首页
linux 加用户到 sudo

linux 加用户到 sudo

作者: liuyangcc | 来源:发表于2018-01-04 23:15 被阅读0次
  • 用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

相关文章

网友评论

      本文标题:linux 加用户到 sudo

      本文链接:https://www.haomeiwen.com/subject/rdodnxtx.html