Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have external monitoring tool which will access our linux machines through SSH and will read top/ping/netstat/disk activity. As i am creating separated ssh key and separated user for this purpose i wonder if i can restrict this user in any way or it does have to be admin user.

Is there any fine-grained control of what user can run and what not ? e.g. scp our DB dump out is bad, read top statistics or ping to anothe machine is fine...

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

A good practice would be to create a user that has next to no privileges, then setup sudo. The monitoring account can run the commands you need for checking the status via and nothing else.

On my Nagios setup, I have a basic user named nagios combined with the sudo config that looks like this.

### Nagios commands
nagios ALL=NOPASSWD: /etc/nagios_checks/*, /usr/lib/nagios/plugins/*
share|improve this answer
    
how i can setup 'sudo sup' in Ubuntu/Debian ? any reference / tutorial available ? –  martin85 May 7 '13 at 23:54
    
Sorry about the 'sudo sup', the 'sup' bit was a typo. Just install sudo, if it isn't already. Then configure sudo. Refer to the sudo man page, or the examples on the sudo web page. –  Zoredache May 8 '13 at 0:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.