Operating System - HP-UX
1834711 Members
2527 Online
110069 Solutions
New Discussion

Re: How to tell if a system is trusted?

 
SOLVED
Go to solution
David Yandry
Frequent Advisor

How to tell if a system is trusted?

Hello HPUX experts,

Can anyone tell me a reliable way to tell if a system is a trusted system or not in a shell script?

Thanks,
David
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: How to tell if a system is trusted?

Well, I would say the "best" answer is to mimic the action of the iscomsec() system call since that is what the OS would do.

if [[ -f /tcb/files/auth/system/default ]]
then
echo "I is trusted"
else
echo "I a\'int"
fi

Man 2 iscomsec for details.

If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: How to tell if a system is trusted?

Well, I would say the "best" answer is to mimic the action of the iscomsec() system call since that is what the OS would do.

if [[ -f /tcb/files/auth/system/default ]]
then
echo "I is trusted"
else
echo "I a\'int"
fi

Man 2 iscomsec for details.

If it ain't broke, I can fix that.
Caesar_3
Esteemed Contributor

Re: How to tell if a system is trusted?

Hello!

Check if you have the /tcb directory
with more directorys and files.
In your /etc/passwd on the password field you will see * and not encripted string -
that's mean that you in trusted mode.

Also you can run SAM and there you have trusted mode so you will see if you can activate or disable

Caesar
K.Vijayaragavan.
Respected Contributor

Re: How to tell if a system is trusted?

Enclosing URL for an already existing discussion on this regard.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x8a8f44f56197d711abdc0090277a778c,00.html
"Let us fine tune our knowledge together"
Sridhar Bhaskarla
Honored Contributor

Re: How to tell if a system is trusted?

Hi David,

Another way -

/usr/lbin/getprpw $LOGNAME > /dev/null 2>&1
if [ $? != 0 ]
then
echo "System is not trusted"
else
echo "System is trusted"
fi

-Sri
You may be disappointed if you fail, but you are doomed if you don't try