I have to give ssh access to a user, but i want them to execute only limited command set like ifconfig, ip link,restart apache etc. but not adduser etc. Please someone point me in the right direction
Asked
Active
Viewed 493 times
1
1 Answers
0
You don't create a restricted shell to do this. These commands need root access, so start by giving them access to a normal user, without root access. Then, use sudo
to grant them access to specific commands. Is it possible to give sudo access to only a particular command?

muru
- 197,895
- 55
- 485
- 740
sudoers
(man sudoers
, or search for tutorials , e.g. https://www.digitalocean.com/community/tutorials/how-to-edit-the-sudoers-file-on-ubuntu-and-centos or https://www.garron.me/en/linux/visudo-command-sudoers-file-sudo-default-editor.html). – ridgy May 14 '17 at 10:29