1834408 Members
1714 Online
110067 Solutions
New Discussion

access by X

 
Piotr Pyda
Advisor

access by X

How to block to HPUX access by X, for user "yyy" ?
3 REPLIES 3
Dmitriy Peshiy
Advisor

Re: access by X

Hi, Piotr!

Try to add at startup file for CDE /*/dt/config/Xstartup
next:

...
if [ "$LOGNAME" = "root" ]
then exit 1
fi
...

where "/*/" is "/etc/" and "/usr/", of course.

Good Luck.
Sridhar Bhaskarla
Honored Contributor

Re: access by X

Hi Piotr,

Add a startup file like below.

vi /etc/dt/config/Xsession.d/0000.deny

if [ "${USER}" = "yyy" ]
then
/usr/dt/bin/dterror.ds "You Cannot login as $USER through X" "Login Denied" "Exit"
exit 1
fi

If you want multiple users to be denied access, then create a file say /etc/xlogin.deny with entries like

user1:
user2:
user3:

then modify the above script like

grep -q "${USER}:" /etc/xlogin.deny
if [[ $? = 0 ]]
then

fi

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Piotr Pyda
Advisor

Re: access by X

thank you