- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How do I display a message to users as they log in
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 01:25 AM
09-15-2006 01:25 AM
How do I display a message to users as they log in
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 01:30 AM
09-15-2006 01:30 AM
Re: How do I display a message to users as they log in
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 01:30 AM
09-15-2006 01:30 AM
Re: How do I display a message to users as they log in
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 01:31 AM
09-15-2006 01:31 AM
Re: How do I display a message to users as they log in
You can create a text meesage in the /etc/issue file, this will be displayed to the users before they login.
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 01:32 AM
09-15-2006 01:32 AM
Re: How do I display a message to users as they log in
before telnet login : /etc/issue
after log : /etc/copyright
Jean-Yves Picard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 01:53 AM
09-15-2006 01:53 AM
Re: How do I display a message to users as they log in
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 01:58 AM
09-15-2006 01:58 AM
Re: How do I display a message to users as they log in
Make sure that '/etc/motd' is world-readable.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 02:26 AM
09-15-2006 02:26 AM
Re: How do I display a message to users as they log in
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 02:30 AM
09-15-2006 02:30 AM
Re: How do I display a message to users as they log in
if ( -f /etc/motd ) then
cat /etc/motd # message of the day.
endif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 02:31 AM
09-15-2006 02:31 AM
Re: How do I display a message to users as they log in
Instead of /etc/profile you will need to check /etc/csh.login and see if the 'cat /etc/motd' is commented out or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 02:53 AM
09-15-2006 02:53 AM
Re: How do I display a message to users as they log in
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 02:58 AM
09-15-2006 02:58 AM
Re: How do I display a message to users as they log in
because there is nothing stopping the user from removing it from their own .cshrc file. I know I would if I was a user ;p
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 03:02 AM
09-15-2006 03:02 AM
Re: How do I display a message to users as they log in
vi /etc/motd add your message
chmod 644 /etc/motd
vi /etc/csh.login
add the following at the end of it, if it doens't exist in the file.
if ( -f /etc/motd ) then
cat /etc/motd # message of the day.
endif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 03:06 AM
09-15-2006 03:06 AM
Re: How do I display a message to users as they log in
I should have guessed that you had a 'csh' :-))
OK, create '/etc/csh.login'. This should be a 'csh' script. It will be sourced (read) before '${HOME}/.cshrc' is processed. It is the analog to '/etc/profile' as used by the Posix shell.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 05:04 AM
09-15-2006 05:04 AM
Re: How do I display a message to users as they log in
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 05:19 AM
09-15-2006 05:19 AM
Re: How do I display a message to users as they log in
-r--r--r-- 1 root root /etc/motd
-rwxr-xr-x 1 root root /etc/csh.login
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 05:30 AM
09-15-2006 05:30 AM
Re: How do I display a message to users as they log in
Does it give you the motd? Or do you get any errors?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 05:39 AM
09-15-2006 05:39 AM
Re: How do I display a message to users as they log in
While what you are looking to do is definitely possible with csh, there are several reasons to switch to a more modern (and more standard) shell.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 06:48 AM
09-15-2006 06:48 AM
Re: How do I display a message to users as they log in
But if the login is bypasing these profiles, you need to override this (non-Unix) behavior. Do this in *EVERY* user's $HOME directory:
echo "*loginShell: true" >> $HOME/.Xdefaults
Now you will see a 'normal' login complete with copyright message, motd message, email notification, etc.
And for interesting reading:
http://www.maths.leeds.ac.uk/~read/csh.html
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 06:57 AM
09-15-2006 06:57 AM
Re: How do I display a message to users as they log in
To add to Jonathan and Bill's suggested reading (a classic paper at that), please read the WARNINGS section of the 'csh' manpages. The 'csh' truly deserves to be jettisoned:
http://docs.hp.com/en/B2355-60127/csh.1.html
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2006 08:49 AM
09-15-2006 08:49 AM
Re: How do I display a message to users as they log in
In sshd_config add:
# Banner to be printed before authentication starts.
Banner /some/path/issue
# cat /some/path/issue
Your-Company Private Network / Réseau privé de Your-Company
Avis:
L'utilisation des systèmes de Your-Company est réservée à des fins commerciales.
Toute utilisation peut faire l'objet d'une surveillance pour assurer
le respect des normes de sécurité et d'exploitation. Par conséquent,
les communications, y compris le transfert de données et le courrier
électronique, ne devraient pas être considérées privées.
Notice:
Use of Your-Company's systems is intended for business purposes.
All use can and may be monitored for security and operational
compliance and therefore communication, including data transfer
and electronic mail, should not be considered to be private.
Nice thing about that is, it is displayed before they enter their password.
Rgds...Geoff