So I want to create a special system management user that can only install, update and remove packages, but don't want to let them use the sudo
command directly. Say for example on a Debian based system like Ubuntu or Linux Mint you can use the command apt
to install, and you just enter your user password, which will temporarily elevate that user's permissions to install, remove and update packages, whereas doing apt-get
requires sudo
at the beginning, which is what I want to avoid a the user from using.
Case in example, your don't want them to use this;
$ sudo apt-get <flag> <package>
✗
but you want them to use this instead;
$ apt <flag> <package>
✔
I understand there's a specific way of granting permissions to certain command wheels, without granting full usage to the specified commands, but I'm not sure how to set it up for individual users case like this.
root
anyway, regardless of any other restrictions. – Stephen Kitt Jan 15 '18 at 11:00sudo
command, since you're only allowing temporary elevated permissions to install, update and remove packages. You don't want to allow them to usesudo
for anything else. – Jan 16 '18 at 22:51apt
instead limiting to using only that command for updating, installing or removing packages. – Jan 16 '18 at 22:53sudo
, but that’s the least of your worries by that stage). – Stephen Kitt Jan 16 '18 at 23:11dpkg
commands as well. – Jan 18 '18 at 08:04apt
and onlyapt
. Give meapt
on any Debian machine and I’ll get you a root shell pronto. (But then, if you’re running Debian or a derivative there’s a strong chance I’m effectively root on your system anyway.) – Stephen Kitt Jan 18 '18 at 08:08apt
able to install packages” etc. There aren’t any root-enabling vulnerabilities inapt
as far as I know! – Stephen Kitt Jan 18 '18 at 22:29sudo
is better than a wide-opensudo
, that’s for sure. However I don’t like relying on people’s lack of cleverness — that tends to lead to complacency... Plus leaving this kind of access open means that compromising root is much easier, an attacker only needs to compromise a system manager. Comparingsudo
to physical access is IMO somewhat misleading since the risk equation is completely different (an attacker is unlikely to be spotted in time). – Stephen Kitt Feb 09 '18 at 09:29