430
you are viewing a single comment's thread
view the rest of the comments
[-] cornshark@lemmy.world 56 points 3 months ago

Sudo makes you enter your password and docker doesn't?

[-] locuester@lemmy.zip 42 points 3 months ago

Docker does by default - it only works if you use sudo. But the docs tell you to add yourself to the docker group (which requires sudo to do). Then running docker doesn’t require sudo anymore.

[-] squaresinger@lemmy.world 53 points 3 months ago

Yeah, that's a terrible decision in the docs. Don't ever add a path where anything on the shell can execute user-modifyable code as root.

As soon as you do that, you lose any protection that comes from separating root users and non-root users. Because now any malicious program can just use docker to elevate its code to root.

[-] Zikeji@programming.dev 27 points 3 months ago

Or don't give your user docker and use sudo to use the docker CLI to get the same effect. Hell, you could even alias docker as sudo docker to get the same feel.

[-] tabular@lemmy.world 9 points 3 months ago

Sudo can/usually does ask for password - but if you're feeling lucky you can use sudo without a password.

(Currently doing that after repeatedly failing to install an OS and have not yet felt compelled to change it back).

[-] mkwt@lemmy.world 1 points 3 months ago

Most systems I use will keep a sudo authentication session open for several minutes, so you don't have to repeatedly enter your password on every single command.

[-] tabular@lemmy.world 1 points 3 months ago

It's a great feature - a necessary feature even. Tired using doas Linux port and that feature isn't supported - it was depressing.

[-] hperrin@lemmy.ca 4 points 3 months ago

Only if you tell it to.

this post was submitted on 01 Jun 2026
430 points (99.1% liked)

Programmer Humor

33320 readers
1565 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS