1834769 Members
2884 Online
110070 Solutions
New Discussion

Re: smtp account check

 
Sanjiv Sharma_1
Honored Contributor

smtp account check

Hi,

Can someone check whether this check is correct or suggest a better way? This is on HP-UX 11.11 Trusted System.

{
testone=1
FOUND=$(nexec -e grep -ic 'smtp:' /etc/passwd)
if test $FOUND -eq 0
then
testone=0
else
FOUND=$(nexec -e "/usr/lbin/getprpw -l smtp | grep -ic 'alock=YES' ")
if test $FOUND -eq 0
then
testone=0
fi
fi

if test $testone -eq 0
then
Passed "Ref 1.3 - User smtp disabled";
else
Failed "Ref 1.3 - User smtp is enabled";
fi
}
Everything is possible
1 REPLY 1
Sanjiv Sharma_1
Honored Contributor

Re: smtp account check

You may ignore the "nexec -e"
Everything is possible