ZhangZhihui's Blog  
scnzzh@ZUBT1:~$ sudo gpasswd -d root docker
Removing user root from group docker
scnzzh@ZUBT1:~$ sudo usermod -aG docker scnzzh
scnzzh@ZUBT1:~$ groups
scnzzh adm cdrom sudo dip plugdev lpadmin lxd sambashare
scnzzh@ZUBT1:~$ groups scnzzh
scnzzh : scnzzh adm cdrom sudo dip plugdev lpadmin lxd sambashare docker

If relogin, the 'groups' and 'groups scnzzh' will show the same groups.

scnzzh@ZUBT1:~$ id scnzzh
uid=1000(scnzzh) gid=1000(scnzzh) groups=1000(scnzzh),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),131(lxd),132(sambashare),997(docker)

 

posted on 2020-10-20 09:08  ZhangZhihuiAAA  阅读(160)  评论(0编辑  收藏  举报