ralmada
asked on
AIX 5.3 - Enabled services
I have used a script to determine the services running on a specific AIX server. So the script have two sections that I'm not sure about.
1)
br_1
INETCONF="/etc/inetd.conf"
echo "# Checking for $INETCONF has services running that should be disabled - FAILS CHECK"
echo `egrep "^time|^daytime|^echo|^cha rgen|^teln et|^finger |^talk|^co msat|^shel l|^login|^ uucp|^tftp |^name|^pr inter|^she ll|^login" $INETCONF`
enbr_1
This produces this results:
BEGINRECORD
416
# Checking for /etc/inetd.conf has services running that should be disabled - FAILS CHECK
ENDRECORD
So how should I interpret the result?
2)
br_1
echo "# Checking ChatList=name exec comsat talk uucp smtp tftp finger systat netstat rquotad rusersd sprayd walld rexd shell login exec comsat time echo discard daytime chargen 100087 rwalld rstatd 100068 100083 100221 fs ufsd 100232 100235 printer 536870916"
for SERVC in $ChatList
do
grep "^${SERVC}" ${INET} >/dev/null 2>&-
if [ $? -eq 0 ]; then
echo "# $SERVC Open - FAILS CHECK"
else
echo "# $SERVC Closed - PASSES CHECK"
fi
done
enbr_1
And the result is:
BEGINRECORD
418
# Checking ChatList=name exec comsat talk uucp smtp tftp finger systat netstat rquotad rusersd sprayd walld rexd shell login exec comsat time echo discard daytime chargen 100087 rwalld rstatd 100068 100083 100221 fs ufsd 100232 100235 printer 536870916
# name Closed - PASSES CHECK
# exec Closed - PASSES CHECK
# comsat Closed - PASSES CHECK
# talk Closed - PASSES CHECK
...
ENDRECORD
So it seems that the result for this one differs from the result of the first script.
To sum up, can I say that the services are disabled or not?
Is there a better way to check for enabled services?
Thanks for the help!
1)
br_1
INETCONF="/etc/inetd.conf"
echo "# Checking for $INETCONF has services running that should be disabled - FAILS CHECK"
echo `egrep "^time|^daytime|^echo|^cha
enbr_1
This produces this results:
BEGINRECORD
416
# Checking for /etc/inetd.conf has services running that should be disabled - FAILS CHECK
ENDRECORD
So how should I interpret the result?
2)
br_1
echo "# Checking ChatList=name exec comsat talk uucp smtp tftp finger systat netstat rquotad rusersd sprayd walld rexd shell login exec comsat time echo discard daytime chargen 100087 rwalld rstatd 100068 100083 100221 fs ufsd 100232 100235 printer 536870916"
for SERVC in $ChatList
do
grep "^${SERVC}" ${INET} >/dev/null 2>&-
if [ $? -eq 0 ]; then
echo "# $SERVC Open - FAILS CHECK"
else
echo "# $SERVC Closed - PASSES CHECK"
fi
done
enbr_1
And the result is:
BEGINRECORD
418
# Checking ChatList=name exec comsat talk uucp smtp tftp finger systat netstat rquotad rusersd sprayd walld rexd shell login exec comsat time echo discard daytime chargen 100087 rwalld rstatd 100068 100083 100221 fs ufsd 100232 100235 printer 536870916
# name Closed - PASSES CHECK
# exec Closed - PASSES CHECK
# comsat Closed - PASSES CHECK
# talk Closed - PASSES CHECK
...
ENDRECORD
So it seems that the result for this one differs from the result of the first script.
To sum up, can I say that the services are disabled or not?
Is there a better way to check for enabled services?
Thanks for the help!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER