Try another way to add group

This commit is contained in:
phahulin 2017-07-14 15:19:21 +03:00 committed by GitHub
parent 5b8d4b8e67
commit 264247a9b8
1 changed files with 5 additions and 4 deletions

View File

@ -73,10 +73,11 @@ add_user_to_docker_group() {
sudo groupadd docker
sudo gpasswd -a "${ADMIN_USERNAME}" docker
# based on https://superuser.com/a/345051
orig_group_id=$(id -gn)
echo "===== orig_group_id = ${orig_group_id}"
newgrp docker
newgrp "${orig_group_id}"
#orig_group_id=$(id -gn)
#echo "===== orig_group_id = ${orig_group_id}"
#newgrp docker
#newgrp "${orig_group_id}"
exec sg docker newgrp `id -gn`
echo "===== Groups: "
groups
echo "<===== add_user_to_docker_group"