PDA

View Full Version : :D Portsentry error !!


Mounir
23rd August 2006, 13:22
Hi

I used the Chkrootkit-Portsentry-Howto. evrythings goes well.

I got this error when i try to start de init.

/etc/init.d/portsentry start


Starting Portsentry...
/etc/init.d/portsentry: line 9: /usr/local/psionic/portsentry/portsentry: No such file or directory
/etc/init.d/portsentry: line 14: /usr/local/psionic/portsentry/portsentry: No such file or directory
Portsentry is now up and running!

In the /usr/local/psionic/portsentry/ i have:

portsentry.conf portsentry.conf~ portsentry.ignore

Can u help please?
Thanx

Mounir :D:cool:

falko
24th August 2006, 18:22
What's in /etc/init.d/portsentry?

Mounir
25th August 2006, 13:02
What's in /etc/init.d/portsentry?

script out the howto:


case "$1" in
start)
echo "Starting Portsentry..."
ps ax | grep -iw '/usr/local/psionic/portsentry/portsentry -atcp' | grep -iv 'grep' > /dev/null
if [ $? != 0 ]; then
/usr/local/psionic/portsentry/portsentry -atcp
fi

ps ax | grep -iw '/usr/local/psionic/portsentry/portsentry -audp' | grep -iv 'grep' > /dev/null
if [ $? != 0 ]; then
/usr/local/psionic/portsentry/portsentry -audp
fi
echo "Portsentry is now up and running!"
;;
stop)
echo "Shutting down Portsentry..."
array=(`ps ax | grep -iw '/usr/local/psionic/portsentry/portsentry' | grep -iv 'grep' \
| awk '{print $1}' | cut -f1 -d/ | tr '\n' ' '`)
element_count=${#array[@]}
index=0
while [ "$index" -lt "$element_count" ]
do
kill -9 ${array[$index]}
let "index = $index + 1"
done
echo "Portsentry stopped!"
;;
restart)
$0 stop && sleep 3
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0


Thanx
:D

falko
26th August 2006, 15:19
The script should be

#!/bin/bash


case "$1" in
start)
echo "Starting Portsentry..."
ps ax | grep -iw '/usr/local/psionic/portsentry/portsentry -atcp' | grep -iv 'grep' > /dev/null
if [ $? != 0 ]; then
/usr/local/psionic/portsentry/portsentry -atcp
fi

ps ax | grep -iw '/usr/local/psionic/portsentry/portsentry -audp' | grep -iv 'grep' > /dev/null
if [ $? != 0 ]; then
/usr/local/psionic/portsentry/portsentry -audp
fi
echo "Portsentry is now up and running!"
;;
stop)
echo "Shutting down Portsentry..."
array=(`ps ax | grep -iw '/usr/local/psionic/portsentry/portsentry' | grep -iv 'grep' \
| awk '{print $1}' | cut -f1 -d/ | tr '\n' ' '`)
element_count=${#array[@]}
index=0
while [ "$index" -lt "$element_count" ]
do
kill -9 ${array[$index]}
let "index = $index + 1"
done
echo "Portsentry stopped!"
;;
restart)
$0 stop && sleep 3
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0

What's the output of
updatedb
locate portsentry?