Operating System - HP-UX
1753479 Members
5008 Online
108794 Solutions
New Discussion юеВ

How do I display a message to users as they log in

 
Pamela Hammitt
Advisor

How do I display a message to users as they log in

HPUX 11.00 I need to notify users when new software is installed ,etc. How do I do that?
20 REPLIES 20
IT_2007
Honored Contributor

Re: How do I display a message to users as they log in

You can edit /etc/motd file and add your comments so that users can see it whenever they login.
James R. Ferguson
Acclaimed Contributor

Re: How do I display a message to users as they log in

Hi Pamela:

Place your message into '/etc/motd'. The file is 'cat'ed in '/etc/profile' to the user's terminal upon login if it exists.

'motd' = Message-Of-The-Day

...and is intended for uses like this.

Regards!

...JRF...
Robert-Jan Goossens
Honored Contributor

Re: How do I display a message to users as they log in

Hi Pamela,

You can create a text meesage in the /etc/issue file, this will be displayed to the users before they login.

Regards,
Robert-Jan
Jean-Yves Picard
Trusted Contributor

Re: How do I display a message to users as they log in

Hello,

before telnet login : /etc/issue

after log : /etc/copyright

Jean-Yves Picard

Pamela Hammitt
Advisor

Re: How do I display a message to users as they log in

I created a text file for /etc/motd with the message. I then checked /etc/profile. The lines that cat motd are not commented out. When I log in as a user, I don't get the message...What else do I need to check?
James R. Ferguson
Acclaimed Contributor

Re: How do I display a message to users as they log in

Hi Pamela:

Make sure that '/etc/motd' is world-readable.

Regards!

...JRF...
Pamela Hammitt
Advisor

Re: How do I display a message to users as they log in

It has permissions 755. We login using the csh. Does that matter?
Jonathan Fife
Honored Contributor

Re: How do I display a message to users as they log in

You should have a file /etc/csh.login. Take a look at that file and see if /etc/motd is cat'ed in it --

if ( -f /etc/motd ) then
cat /etc/motd # message of the day.
endif
Decay is inherent in all compounded things. Strive on with diligence
Patrick Wallek
Honored Contributor

Re: How do I display a message to users as they log in

Yes, it absolutely matters.

Instead of /etc/profile you will need to check /etc/csh.login and see if the 'cat /etc/motd' is commented out or not.