Skip to contentSkip to conversation

docs/devel/testing: Add -a option to usermod command on docker setup

PATCH In review Murilo Opsfelder Araujo 2 participants 2 messages Feb 7, 2019 – Feb 8, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs/devel/testing: Add -a option to usermod command on docker setup

The option -G of usermod command will remove user from other groups not listed, i.e.: $USER will belong only to group 'docker' after following the documentation as is.

Quoted 1 line

From usermod(8) manual page:

If the user is currently a member of a group which is not listed, the user will be removed from the group. This behaviour can be changed via the -a option, which appends the user to the current supplementary group list.

This patch improves the situation by adding the -a option to the usermod command, which will just append user to the supplementary group list.

---
 docs/devel/testing.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
docs/devel/testing.rst +1 -1
index 18e2c0868a..135743a2bf 100644
@@ -301,7 +301,7 @@ An alternative method to set up permissions is by adding the current user to
 .. code::
 
   $ sudo groupadd docker
-  $ sudo usermod $USER -G docker
+  $ sudo usermod $USER -a -G docker
   $ sudo chown :docker /var/run/docker.sock
 
 Note that any one of above configurations makes it possible for the user to
Signature · 1 line
2.20.1
#1 lore raw
Quoted 11 lines · Murilo Opsfelder Araujo

The option -G of usermod command will remove user from other groups not listed, i.e.: $USER will belong only to group 'docker' after following the documentation as is.

From usermod(8) manual page:

If the user is currently a member of a group which is not listed, the user will be removed from the group. This behaviour can be changed via the -a option, which appends the user to the current supplementary group list.

Quoted 6 lines

This patch improves the situation by adding the -a option to the usermod command, which will just append user to the supplementary group list.

Queued to testing/next, thanks.

Quoted 9 lines
---
 docs/devel/testing.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
docs/devel/testing.rst +0 -0
index 18e2c0868a..135743a2bf 100644

docs/devel/testing.rst An alternative method to set up permissions is by adding the current user to · line 307

Quoted 8 lines
docs/devel/testing.rst +1 -1
@@ -301,7 +301,7 @@ An alternative method to set up permissions is by adding the current user to
 .. code::
 
   $ sudo groupadd docker
-  $ sudo usermod $USER -G docker
+  $ sudo usermod $USER -a -G docker
   $ sudo chown :docker /var/run/docker.sock
 
 Note that any one of above configurations makes it possible for the user to

--
Alex Bennée