Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
OrBaruk137y@seraphimsystems not really, root isn't enabled by default on Ubuntu and I hadn't set a password for root
Fixed it already just had to mount /etc/sudoers inside the container and add my user in it -
A-C-E56527y@OrBaruk I thought container and host were separate?
This could be bad if someone could do this kind of privilege escalation with docker -
Root797797y@7400 docker runs as root.
The ease of using it to escalate privilege is one of its downsides. Or upsides, in this case. -
Root797797y@DeveloperACE you can mount whatever parts of the host filesystem you desire in the container.
Just added a group to my user without the -a option....
Result: my user no longer belongs to the sudo group and I do not have access to the root user or sudo.
Hopefully the group I added was docker, time for some container shenanigans to escalate my privilege back.
rant
docker sudo group sudoers locked root