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.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章