Operating System - HP-UX
1758535 Members
1794 Online
108872 Solutions
New Discussion юеВ

ez way to temporarily restrict dtremote access

 
SOLVED
Go to solution
jmb
Regular Advisor

ez way to temporarily restrict dtremote access

This forum has been great, with a ton of good ideas, as I've worked with AIX, but am new to HP-UX.

I'm looking for an equivalent of the /etc/nologin, which works fine for standard conenctions, that will work for dtremote. I just want to be able to "switch off" XWindows access (and any others, if a quick solution), then switch it back on. I might end up with a script to do it all, but wondering what files/settings need to get hit. fyi, this is UX 11.0, on a smaller system. There is not currently an /etc/dt/config/Xsetup file.

Thanks one and all
3 REPLIES 3
rajsri
Frequent Advisor

Re: ez way to temporarily restrict dtremote access

You can use the following command to stop Xsessions, if any user is currently using it will kill them.

/sbin/init.d/dtlogin.rc stop

when you want to enable run

/sbin/init.d/dtlogin.rc start

If you want to disable permanently you edit the file /etc/rc.config.d/desktop
change DESKTOP=CDE to DESKTOP=

Hope this helps
Raj
Niraj Kumar Verma
Trusted Contributor

Re: ez way to temporarily restrict dtremote access

Hi,

Try this out

# cp /usr/dt/config/Xaccess /etc/dt/config/.


You can chnage the parameters according to your need in Xaccess file.

# /sbin/init.d/dtlogin.rc stop
# /sbin/init.d/dtlogin.rc start

--Niraj
Niraj.Verma@philips.com
Steve Steel
Honored Contributor
Solution

Re: ez way to temporarily restrict dtremote access

Hi
Add this to /etc/profile

name=$(logname)
if [ -r /etc/nologin ]
then
if [ $name != root ]
then
echo "$name not allowed to login, System is Unavailable"
echo "Exiting"
sleep 2
exit
fi
fi

touch /etc/nologin and chmod 444

Then the non root logins are banned when /etc/nologin exists and is readable


If csh users exists add code /etc/csh.login

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)