1

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

muru
  • 197,895
  • 55
  • 485
  • 740
sfg2k
  • 49
  • Look for 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

1 Answers1

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