Operating System - HP-UX
1847996 Members
7361 Online
104022 Solutions
New Discussion

Login banner / "message of day" --> how to set?

 
SOLVED
Go to solution
Jeff Sen
New Member

Login banner / "message of day" --> how to set?

Siple question: How do I create & enable display of a custom message, everytime any user logs into the box?

Thanks!!
Jeff
5 REPLIES 5
thebeatlesguru
Regular Advisor

Re: Login banner / "message of day" --> how to set?

edit /etc/profile or /etc/csh.login
write what u want show in it.
echo "......."

PS:if the user shell is sh,add it to profile
if the user shell is csh,add it to csh.login
hihi
Steven Sim Kok Leong
Honored Contributor

Re: Login banner / "message of day" --> how to set?

Hi,

You can add it in either into /etc/issue or /etc/motd.

/etc/issue is referenced by getty. /etc/motd is referenced from /etc/profile.

Hope this helps. Regards.

Steven Sim Kok Leong
Bill Hassell
Honored Contributor
Solution

Re: Login banner / "message of day" --> how to set?

There is an imoportant difference between /etc/issue and /etc/motd. /etc/issue is shown *anyone* on the network before they try to connect, so /etc/issue must be free of any security-related information such as the type of computer, the operating system name and revision, and physical location. You don't want anyone to have this knowledge without a proper login and password.

Note: /etc/issue should be explicitly added to the startup of telnetd and rlogind. Otherwise you'll get an unsecure default message:

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

/etc/motd does not exist by default and both /etc/profile and /etc/csh.login will display this file when it exists. This is the usual message location for each user to see after they login.


Bill Hassell, sysadmin
Jeff Sen
New Member

Re: Login banner / "message of day" --> how to set?

Thanks for the quick responses! Very impressive! I will try the suggestions.

-Jeff
K.Vijayaragavan.
Respected Contributor

Re: Login banner / "message of day" --> how to set?

In CDE,

If you want Xwindows to display customised messages while users get into you box,

you can use the command "dthello"

Normally this is used to display copyright message display.

You can edit the file "/usr/dt/bin/Xsession" and look for the line

"dtstart_hello_inof[0]="$DT_BINPATH/dthello -file $INFO_PATH -file /etc/copyright &"

As this line tells the script to display the content of /etc/copyright file it displays it while on booting.

If you want to display the content of some other file you can edit this line accordingly.
Make sure you give reed permission to all for the new file you specify.

-Vijay
"Let us fine tune our knowledge together"