From: jry@redtail.genetics.utah.edu (Jim Yehle - Leppert Lab)
Subject: xdm sessions at C2 security
Date: 1998/02/13 [thread overview]
Message-ID: <6c2bn8$chh$1@coward.cc.utah.edu> (raw)
The FAQ writeup applies to 3.x, and it all changed in 4.x.
Try this script for OS v 4.x:
#!/usr/bin/sh
#
# xdm-c2.sh
#
# Add a terminal to XDM allowables list under C2 (enhanced security)
PATH=$PATH:/usr/tcb/bin; export PATH
echo -n "Enter name or IP address of trusted X host: > "
read host
#n just look 'em both up
#n if echo "$host" |egrep '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$' >/dev/null
nslookup $host >/dev/null
EX=$?
if [ $EX != 0 ]; then
echo "nslookup failed w/ exit status $EX"
exit $EX
fi
qualhost=`nslookup $host |egrep '^Name:' |awk '{print $2}'`
lochost=`echo $qualhost |cut -d. -f1` # Chop off domain
echo "Attempting to add the following tty entry:"
edauth -g -d t local:0 |sed "s/local/$lochost/g"
edauth -g -d t local:0 |sed "s/local/$lochost/g" |edauth -d t -s -C
echo "Attempting to add the following devassign entry:"
echo "$lochost\:0:v_devs=$lochost\:0:v_type=xdisplay:chkent:"
echo "$lochost\:0:v_devs=$lochost\:0:v_type=xdisplay:chkent:" \
|edauth -d v -s -C
echo -n "Allow logins as root from $lochost? "
read rootyesno
case _$rootyesno in
_Yy*)
if egrep "^$lochost:0\$" >/dev/null; then
echo Appending $lochost:0 to /etc/securettys
echo $lochost:0 >>/etc/securettys
fi
if egrep "^$qualhost:0\$" >/dev/null; then
echo Appending $qualhost:0 to /etc/securettys
echo $qualhost:0 >>/etc/securettys
fi
;;
*)
;;
esac
--
Jim
--
jim.yehle%at%genetics%dot%utah%dot%edu
Eccles Institute of Human Genetics
University of Utah, Salt Lake 84112
reply other threads:[~1998-02-13 5:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox