CoreOS 添加用户并赋予sudo权限

使用root账号登录CoreOS

username 为你要添加的用户登录名

添加用户到root组

useradd -g rot username

添加 sudo 权限

visudo -f /etc/sudoers.d/username

打开文件输入

user1 ALL=(ALL) NOPASSWD: ALL

保存退出

使用username登录系统,然后执行下面代码检查是否授权成功

username@server ~ $ sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE

参考:https://coreos.com/os/docs/latest/adding-users.html

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

原文地址:https://www.cnblogs.com/grj1046/p/7822490.html