System Administration
Showing results for 
Search instead for 
Did you mean: 

How to get login message

Go to solution
James R. Ferguson
Acclaimed Contributor

Re: How to get login message

Hi (again):

> I checked following files but there is no

What is the user's SHELL? This will determine the login profile that is processed. We have assumed that it is the standard Posix shell since this is HP-UX.

If the default shell is either '/usr/bin/sh' or '/usr/bin/ksh' then '/etc/profile' is first processed and then '${HOME}/.profile'. Look at both of those.


Super Advisor

Re: How to get login message


I checked the file /etc/profile. but there is no file like that.

the shell is /usr/bin/sh
James R. Ferguson
Acclaimed Contributor

Re: How to get login message


I suggest you do:

# diff /usr/newconfig/etc/profile /etc/profile

# diff /usr/newconfig/etc/skel/.profile /home/ze4egi/.profile

...If this doesn't lead you the solution, post the output of both.


Respected Contributor

Re: How to get login message

check /etc/profile .

# Message of the day
if [ -r /etc/motd ]
cat /etc/motd

It may be accessing any other file in place of motd which containing these messages.

Also check /etc/copyright

Super Advisor

Re: How to get login message

Hi Bijo

the file /etc/copyright
Bart Paulusse
Respected Contributor

Re: How to get login message

Hi Senthil,

Message after "Please wait...checking for disk quotas" is usualy file /etc/copyright. It looks like your company has edited the standard HP copyright message a little.
The message after "You last logged in Thursday April 16, 2009 at 07:53, on GMLG Node lgapps." is a custom message.
It is either in ${HOME}/.profile ${HOME}/.login ${HOME}/.cshrc or there is a file being sourced in one of these files.

shell /usr/bin/sh uses .profile, try to do ls -al in your homedir to look for those . files.

Suraj K Sankari
Honored Contributor

Re: How to get login message


Yes may this comming from /etc/copyright but you can set those messages in /etc/motd.
motd means message of the day.

Ganesan R
Honored Contributor

Re: How to get login message

Hi Senthil,

We already explained you this.. The following three files will be sourced during the login process. If you understand well, then you yourself can locate the sourcing file.

When you login through telnet or ssh first /etc/issue will be sourced and shown on the screen. This is before login prompt and will be shown like this..
This system is for the use of authorized users only.
Individuals using this computer system without authority, or in
excess of their authority, are subject to having all of their
activities on this system monitored and recorded by system
In the course of monitoring individuals improperly using this
system, or in the course of system maintenance, the activities
of authorized users may also be monitored.
Anyone using this system expressly consents to such monitoring
and is advised that if such monitoring reveals possible
evidence of criminal activity, system personnel may provide the
evidence of such monitoring to law enforcement officials.

login: username
Password: xxxx
As soon as you give the username and password /etc/copyright will be issued and followed with /etc/motd file. Normally people use to put customised messages on /etc/motd if they want to inform something to users.
(c)Copyright 1983-2000 Hewlett-Packard Co., All Rights Reserved.
(c)Copyright 1979, 1980, 1983, 1985-1993 The Regents of the Univ. of California
(c)Copyright 1980, 1984, 1986 Novell, Inc.
(c)Copyright 1986-1992 Sun Microsystems, Inc.
(c)Copyright 1985, 1986, 1988 Massachusetts Institute of Technology
(c)Copyright 1989-1993 The Open Software Foundation, Inc.
(c)Copyright 1986 Digital Equipment Corp.
(c)Copyright 1990 Motorola, Inc.
(c)Copyright 1990, 1991, 1992 Cornell University
(c)Copyright 1989-1991 The University of Maryland
(c)Copyright 1988 Carnegie Mellon University
(c)Copyright 1991-2000 Mentat Inc.
(c)Copyright 1996 Morning Star Technologies, Inc.
(c)Copyright 1996 Progressive Systems, Inc.
(c)Copyright 1991-2000 Isogon Corporation, All Rights Reserved.

Use, duplication, or disclosure by the U.S. Government is subject to
restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
Technical Data and Computer Software clause in DFARS 252.227-7013.

Hewlett-Packard Company
3000 Hanover Street
Palo Alto, CA 94304 U.S.A.

Rights for non-DOD U.S. Government Departments and Agencies are as set
forth in FAR 52.227-19(c)(1,2).

here comes the content of /etc/motd file...

Best wishes,

S. Ney
Trusted Contributor

Re: How to get login message

I'd suggest creating the following files in /etc: /etc/motd and /etc/issue. Make sure each is readable and writable by root only for editing. Use vi and add a line like "Unauthorized use is prohibited" to both and save the files.

edit the following file and check these lines:
#PrintMotd yes
# no default banner path
Banner /etc/issue

edit /etc/inetd.conf file and on telnet line add:
telnetd -b /etc/issue

stop and start the inetd and sshd daemons so the configuration files are read.
Trusted Contributor

Re: How to get login message

How are you logging in using telnet or ssh

If telnet did you check the file

grep -i telnet /etc/inetd.conf

the last coloum will give you a file path check the content of it and let me know
Like it or worked !! Click kudos !!