5

I want to use docker without sudo and follow the guidance from this question. And here is what I did: 1.

sudo groupadd docker

and it showed

groupadd: group 'docker' already exists

2.

sudo gpasswd -a <username> docker

and it showed

Adding user <username> to group docker

3.

newgrp docker

and it showed the error:

newgrp: failed to crypt password with previous salt:invalid argument

I have tried to find more about this error,

newgrp: failed to crypt password with previous salt:invalid argument

but there is very limited information on the internet.

What leads to this error?

Ricardo
  • 71
  • 1
  • 5
  • 1
    After `sudo gpasswd -a docker` you need to logout and log-in back again. To verfiy whether docker commands are running with sudo for non-root user. – mchawre Jul 18 '19 at 16:14
  • Possible duplicate: https://stackoverflow.com/q/48568172/596285 – BMitch Nov 09 '19 at 11:35

1 Answers1

10

If someone has same error try:

  1. sudo usermod -aG docker $USER
  2. newgrp docker

This worked for me

Arvydas97
  • 126
  • 2
  • 7