Operating System - HP-UX
1836935 Members
3193 Online
110111 Solutions
New Discussion

Re: Warning msg in telnet

 
SOLVED
Go to solution
senthil_3
Frequent Advisor

Warning msg in telnet

hi,
can any one help me in giving a waring msg , with a confirmation do u agree or not / if yes give the prompt to work / if no logout. when doing a telnet or login into the system.

tnx
4 REPLIES 4
Steven Sim Kok Leong
Honored Contributor

Re: Warning msg in telnet

Hi,

Just put something like this in your /etc/issue to keep it simple without losing the objective:

By proceeding with the login, you are agreeing to the terms and conditions as stipulated ... and so forth. If you do not agree to these terms and conditions, please do not login.

Hope this helps. Regards.

Steven Sim Kok Leong
James R. Ferguson
Acclaimed Contributor

Re: Warning msg in telnet

Hi:

I agree with Steven, but, you will need to do one more thing.

To override the standard telnetd login banner, specify a file containing a custom banner with the '-b bannerfile' option. Thus, to use /etc/issue, modify '/etc/inetd.conf' to look like:

telnet stream tcp nowait root /usr/lbin/telnetd telnetd -b /etc/issue

Remember to retart 'inetd' afterwards:

# /usr/sbin/inetd -c

Regards!

...JRF...
Andreas Voss
Honored Contributor
Solution

Re: Warning msg in telnet

Hi,

you could add some code in /etc/profile ie.:

echo "........."
echo "........."
echo "Do you agree (y/n) [n] ? \c"
read answer
if [ "$answer" != "y" ]
then
echo "Logout"
exit 0
fi
...
...

Regards
Steven Sim Kok Leong
Honored Contributor

Re: Warning msg in telnet

Hi,

Just to add on, if you are intending to display a warning message prompt in your system profile after logging on, you should also modify /etc/csh.login in addition to /etc/profile. This is because if the login shell is csh, then /etc/csh.login is used instead of /etc/profile.

Hope this helps. Regards.

Steven Sim Kok Leong