List Info

Thread: Re: installing denyhosts in 10.5




Re: installing denyhosts in 10.5
country flaguser name
United States
2008-05-09 13:10:39
Hi All,
    Okay -- the files below (pointed out in Robert's message) were all found to be in place.  Also, based on the thread 


I changed:

SECURE_LOG = /var/log/asl.log   to    SECURE_LOG = /var/log/secure.log

I also commented out the statement   SSHD_FORMAT_REGEX=        

Then, I ran the way Alexander did:

sudo denyhosts-py25.py -c /sw/etc/denyhosts-py25/denyhosts.cfg --daemon


It now appears that denyhosts finds the denyhosts.cfg file.  However, I get the error:

DenyHosts could not obtain lock (pid: 112)
[Errno 17] File exists: '/sw/var/run/denyhosts-py25.pid'


I think I might be getting closer but don't know what to do with this.  Any ideas??

thanks,
g


On May 9, 2008, at 8:31 AM, Robert T Wyatt wrote:

Glenn,

On my 10.4 system, I used these two files:

file 1:

$ cat /Library/StartupItems/daemonic-denyhosts-py25/daemonic-denyhosts-py25
#!/bin/sh
# startup script for service denyhosts-py25, created by daemonic

. /etc/rc.common

case "$1" in
  start)

    ConsoleMessage "Starting Denyhosts-py25"

    if [ -x /sw/bin/python2.5 ]; then
      # run the daemon
      /sw/bin/python2.5  /sw/share/denyhosts-py25/daemon-control-dist
start --debug -c /sw/etc/denyhosts-py25/denyhosts.cfg &

    fi

    ;;
esac

exit 0

=====

file 2:

$ cat /Library/StartupItems/daemonic-denyhosts-py25/StartupParameters.plist
{
  Description = "Denyhosts-py25";
  Provides = ("daemonic-denyhosts-py25");
  Requires = ("Resolver");
  OrderPreference = "None";
  Messages =
  {
    start = "Starting Denyhosts-py25";
    stop = "Stopping Denyhosts-py25";
    restart = "Restarting Denyhosts-py25";
  };
}


====

Note the locations of the files and mind the line-wraps. You'll see that
the location of the denyhosts.cfg file must be specified and that python
was being invoked since DenyHosts is essentially just a python script.

Also, most or all of these files should be present on your system:

$ locate deny
/Library/StartupItems/daemonic-denyhosts-py25
/Library/StartupItems/daemonic-denyhosts-py25/StartupParameters.plist
/Library/StartupItems/daemonic-denyhosts-py25/daemonic-denyhosts-py25
/private/etc/hosts.deny
/private/etc/hosts.deny.purge.bak
/private/var/at/at.deny
/sw/fink/10.4/unstable/main/finkinfo/net/denyhosts-py.info
/sw/fink/10.4/unstable/main/finkinfo/net/denyhosts-py.patch
/usr/lib/pam/pam_deny.so


Keep us posted. By the way, are you using 10.4 or 10.5?

--Robert


glenn millhauser wrote:
Thanks.  When I execute /sw/bin/denyhosts-py25.py I get the error message:

Error reading file: denyhosts.cfg
[Errno 2] No such file or directory: 'denyhosts.cfg'


However, when I check the  /sw/etc/denyhosts-py25 directory,
denyhosts.cfg is there.

Any ideas?

thanks,
g


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Fink-beginners mailing list
Fink-beginnerslists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.beginners




Glenn L. Millhauser

Department of Chemistry & Biochemistry

UC Santa Cruz

Santa Cruz, CA 95064

831 459 2176 voice

831 566 3337 cell

831 459 2935 fax


http://chemistry.ucsc.edu/~glennm

http://www.chemistry.ucsc.edu/faculty/millhauser.html



Re: installing denyhosts in 10.5
country flaguser name
United States
2008-05-09 13:20:02
glenn millhauser wrote:
> Hi All,
>     Okay -- the files below (pointed out in Robert's
message) were all 
> found to be in place.  Also, based on the thread 
>
>    
>  http://thread.gmane.org/gmane.comp.secur
ity.denyhosts.user/397/focus=399
>
> I changed:
>
> SECURE_LOG = /var/log/asl.log   to    SECURE_LOG =
/var/log/secure.log
>
> I also commented out the statement   SSHD_FORMAT_REGEX=
       
>
> Then, I ran the way Alexander did:
>
> sudo denyhosts-py25.py -c
/sw/etc/denyhosts-py25/denyhosts.cfg --daemon
>
>
> It now appears that denyhosts finds the denyhosts.cfg
file.  However, 
> I get the error:
>
> DenyHosts could not obtain lock (pid: 112)
> [Errno 17] File exists:
'/sw/var/run/denyhosts-py25.pid'
>
>
> I think I might be getting closer but don't know what
to do with this. 
>  Any ideas??
>
> thanks,
> g
That would make me suspect that the daemon is already
running for you, 
and it won't let you do a second instance.

------------------------------------------------------------
-------------
This SF.net email is sponsored by the 2008 JavaOne(SM)
Conference 
Don't miss this year's exciting event. There's still time to
save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Fink-beginners mailing list
Fink-beginnerslists.sourceforge.net
h
ttp://news.gmane.org/gmane.os.apple.fink.beginners

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )