Hard code command permission in /etc/sudoers
Posted: 2018/06/20 16:33:23
I am trying to create a user account on my CentOS 6.6 machine with the following permissions only:
- Be able to login to SSH console
- Be able to copy the file /tmp/callTom.call to /tmp/callTom_now.call.
- Be able to change the owner of the file /tmp/callTom_now.call.
- Be able to move the file /tmp/callTom_now.call to /var/spool/asterisk/outgoing/.
I do not want to give the user account permission to do anything else.
Is it possible to hard code specific commands, which this user account can do, in the /etc/sudoers file?
Thank you.
- Be able to login to SSH console
- Be able to copy the file /tmp/callTom.call to /tmp/callTom_now.call.
Code: Select all
cp /tmp/callTom.call /tmp/callTom_now.call
Code: Select all
chown asterisk:asterisk callTom_now.call
Code: Select all
mv /tmp/callTom_now.call /var/spool/asterisk/outgoing/
Is it possible to hard code specific commands, which this user account can do, in the /etc/sudoers file?
Thank you.