Operating System - HP-UX
1820592 Members
1748 Online
109626 Solutions
New Discussion юеВ

How do I setup a login banner viewable through Exceed

 
Galen Benson
Frequent Advisor

How do I setup a login banner viewable through Exceed

I'm trying to setup a login banner that will show up before the $ prompt after users have logged in through Exceed. I've set the /etc/issue file with this banner and tried editing the /etc/profile file to cat this file, but to no avail. Also, I've got this same banner working through both Telnet & console login. Any ideas? HP Support wasn't any help.
6 REPLIES 6
Ivan Ferreira
Honored Contributor

Re: How do I setup a login banner viewable through Exceed

What about /etc/motd. Have you tried it?

Here is a detailed explanation of the files:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=886200
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
spex
Honored Contributor

Re: How do I setup a login banner viewable through Exceed

Hello Galen,

If the underlying communication channel is SSH, then you must modify /opt/ssh/etc/sshd_config to include a 'Banner /path/to/banner' directive. Then force sshd to re-read its configuration via ' kill -HUP $(cat /var/run/sshd.pid)'.

PCS


Galen Benson
Frequent Advisor

Re: How do I setup a login banner viewable through Exceed

Thanks for the quick responses. I've not setup SecureShell yet, but was planning on doing that next. Would I be better off installing/configuring SSH first or using the MOTD & hoping it will still work after SSH is installed?

Galen
Bill Hassell
Honored Contributor

Re: How do I setup a login banner viewable through Exceed

/etc/motd is displayed after you login, while /etc/issue is shown before you login. The /etc/issue file is displayed by telnetd, rlogind (when configured in /etc/inetd.conf) and for ssh, the Banner option can be enabled in the sshd_config file.

/etc/motd is anything you want and is simply cat'ed to your terminal when a normal login is done. But you're using Exceed which means you've out of 'normal' and into the world of Xwindows and GUIs. Unfortunately, the default for terminal windows in X11 is to bypass all normal Unix profiles (don't ask -- no one seems to remember). So in every user's $HOME directory, you need to create the .Xdefaults file for normal logins:

echo "*loginShell: true" >> $HOME/.Xdefaults

Now when you login, you will get a normal login, all the environmental services from your profiles and /etc/motd. Oh yes, you'll get the infamous copyright message too. You can replace it with:

echo "cat /etc/copyright to read copyright msg"


Bill Hassell, sysadmin
Galen Benson
Frequent Advisor

Re: How do I setup a login banner viewable through Exceed

Thanks everyone for the continuing education. I'm still a bit unclear though on whether or not I should upgrade to ssh before changing any of the local profiles. Could anyone elaborate on this? Also, does anyone have a step by step document of the hpux login process? (including Exceed) I think that something like this would greatly help my understanding.

Galen
Galen Benson
Frequent Advisor

Re: How do I setup a login banner viewable through Exceed

I never did receive answers to my followup questions so couldn't assign the full 10 points. Thanks though to those who did reply.