Remote command execution failed: Permission denied,please...
-
- Posts: 35
- Joined: Mon Jan 27, 2014 2:38 am
- Location: New Delhi, India
Re: Remote command execution failed: Permission denied,pleas
Post output here of error when su - nagios
-
- Posts: 35
- Joined: Mon Jan 27, 2014 2:38 am
- Location: New Delhi, India
Re: Remote command execution failed: Permission denied,pleas
Your problem is going to solve in coming posts
Re: Remote command execution failed: Permission denied,pleas
i hope!!! :):)Your problem is going to solve in coming posts
when i try to use the command su - nagios...... nothing happens!!Post output here of error when su - nagios
Code: Select all
root@maestro:~# su - nagios
root@maestro:~#
Code: Select all
id nagios
uid=121(nagios) gid=124(nagios) groups=124(nagios)
-
- Posts: 40
- Joined: Wed Sep 25, 2013 7:01 am
Re: Remote command execution failed: Permission denied,pleas
Forums ate my first response - I had to re-type it (although it may have been a Layer 8 problem here ).
You're getting the same error from the plugin as your command and service definitions are synonymous - they're both exactly the same. Welcome Nagios! It's like Perl sometimes - many different ways to skin many different cats!
Firstly - make sure the plugin you're executing on the remote server has the execute bit set:
Secondly, there's clearly something wrong with your local "nagios" user. Can you provide the output from:
You're getting the same error from the plugin as your command and service definitions are synonymous - they're both exactly the same. Welcome Nagios! It's like Perl sometimes - many different ways to skin many different cats!
Firstly - make sure the plugin you're executing on the remote server has the execute bit set:
Code: Select all
ls -l /usr/local/nagios/libexec/check_nagios
Code: Select all
getent passwd nagios
Re: Remote command execution failed: Permission denied,pleas
Forums ate my first response - I had to re-type it (although it may have been a Layer 8 problem here ).
ok on my remote server backups:Firstly - make sure the plugin you're executing on the remote server has the execute bit set:
Code: Select all
root@backups:/usr/local/nagios/etc# ls -l /usr/local/nagios/libexec/check_nagios-rwxr-xr-x 1 nagios nagios 124350 mag 19 12:02 /usr/local/nagios/libexec/check_nagios
Code: Select all
root@maestro:/usr/lib/nagios/plugins# getent passwd nagios
nagios:x:121:124::/var/lib/nagios:/bin/false
Last edited by aleks1 on Thu Jun 12, 2014 8:01 am, edited 1 time in total.
-
- Posts: 35
- Joined: Mon Jan 27, 2014 2:38 am
- Location: New Delhi, India
Re: Remote command execution failed: Permission denied,pleas
try this command
Code: Select all
su - nagios -s /bin/bash
Re: Remote command execution failed: Permission denied,pleas
try this command
Code: Select all
su - nagios -s /bin/bash
Code: Select all
root@maestro:/usr/lib/nagios/plugins# su - nagios -s /bin/bash
nagios@maestro:~$
Code: Select all
/usr/lib/nagios/plugins/check_by_ssh -4 -H remote address -l root -p 2022 -C "/usr/local/nagios/libexec/check_nagios -t 20 -e 5 -F /usr/local/nagios/var/nagios.log -C /usr/local/nagios/bin/nagios" -vvvvvvvvvvvvvvvvvvvvv
-
- Posts: 35
- Joined: Mon Jan 27, 2014 2:38 am
- Location: New Delhi, India
Re: Remote command execution failed: Permission denied,pleas
yes run this command
Code: Select all
/usr/lib/nagios/plugins/check_by_ssh -H intranet.xx.xx -l root -p 2022 -C "/usr/local/nagios/libexec/check_nagios -t 20 -e 5 -F /usr/local/nagios/var/nagios.log -C /usr/local/nagios/bin/nagios" -vvvvvvvvv
Re: Remote command execution failed: Permission denied,pleas
i read you in mind!!
Code: Select all
nagios@maestro:~$ /usr/lib/nagios/plugins/check_by_ssh -4 -H intranet.xx.xx -l root -p 2022 -C "/usr/local/nagios/libexec/check_nagios -t 20 -e 5 -F /usr/local/nagios/var/nagios.log -C /usr/local/nagios/bin/nagios" -vvvvvvvvvvvvvvvvvvvvv
Command: /usr/bin/ssh
Argument 1: -4
Argument 2: -l
Argument 3: root
Argument 4: -p
Argument 5: 2022
Argument 6: intranet.xx.xx
Argument 7: /usr/local/nagios/libexec/check_nagios -t 20 -e 5 -F /usr/local/nagios/var/nagios.log -C /usr/local/nagios/bin/nagios
root@intranet.xx.xx's password:
NAGIOS OK: 41 processes, status log updated 200 seconds ago
nagios@maestro:~$
yes! and then!it will ask password
-
- Posts: 35
- Joined: Mon Jan 27, 2014 2:38 am
- Location: New Delhi, India
Re: Remote command execution failed: Permission denied,pleas
Follow it Change according to your configuration
Note Enter passphrase (empty for no passphrase): Leave it blank do not set password
Note Enter passphrase (empty for no passphrase): Leave it blank do not set password
Code: Select all
[nagios@jtm01~]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/nagios/.ssh/id_dsa):
Enter passphrase (empty for[b] no passphrase)[/b]:
Enter same passphrase again:
Your identification has been saved in /home/nagios/.ssh/id_dsa.
Your public key has been saved in /home/nagios/.ssh/id_dsa.pub.
The key fingerprint is:
f4:94:48:ef:d8:be:1b:06:11:5f:7a:30:42:ca:08:64 nagios@jtm01
[nagios@jtm01 ~]$ scp -P 2022 /home/nagios/.ssh/id_dsa.pub root@192.192.192.192:/root/.ssh/authorized_keys
root@192.192.192.192's password:
id_dsa.pub 100% 602 0.6KB/s 00:00