check_ssh_login ?

Greg King wgking at shaw.ca
Thu Mar 16 17:49:27 CET 2006


I would use the existing remote plugin execution facilities of NRPE with a custom plugin to verify the id. Pseudo code for a "check_valid_uid" would be:

valid_id=1
UID=$ARG1
grep $UID /etc/passwd
if return_code=0 then
  valid_id=0
  print "User $UID is valid"
  else
   print "User $UID is not valid"
   fi
return valid_id 

There are probably more thorough ways of validing that the id will work than just verifying existence in the /etc/passwd file, but you get the idea.

Regards, Greg

>Message: 6
>From: jeff vier <boinger at tradingtechnologies.com>
>To: nagios-users <nagios-users at lists.sourceforge.net>
>Date: Wed, 15 Mar 2006 08:56:46 -0600
>Subject: [Nagios-users] check_ssh_login ?
>--=-V2oL6qqSss3ngPlX8Yvy
>Content-Type: text/plain
>Content-Transfer-Encoding: quoted-printable
>
>I need to check if I can log into a specific account on a system via SSH, but due to >the nature of the system (tunneled to a serial console), I am unable to set up a key >pair.
>
>check_ssh only verifies that the system is answering to SSH requests (which doesn't >help me, the serial console host almost certainly responds).
>
>check_by_ssh is *close*, but provides no method of passing a password via the command >line (which, yes, is a ghetto method of doing things, but you would still have to >know the login to the system, and it *is different*), and it requires a remote >command to execute.

>So, before I delve into hacking this functionality into check_by_ssh, does anyone >have a solution with existing tools?




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list