> I know this is a stupid question, but I know
> someone out there can answer this real quick.
> Anyway I want to add a message to telnet logins
> (ie when you telnet to my box I want it to say
> "Welcome to ...." after you correctly login).
> How do I do that?  I assume it is as simple as
> editing a text file.  Thanks for all your help.

I saw a number of responses to this, but none
seemed very concise, so I'll toss in my two
cents.


To display a message at the login prompt, edit
the /etc/issue and /etc/issue.net files.

The /etc/issue file is displayed just above the
login prompt for users logging in at the actual
console of the system.

The /etc/issue.net file is displayed just above
the login prompt for users logging in via the
network (telnet and the like).

Be aware, the /etc/issue and /etc/issue.net
files are recreated from scratch at boot-up, via
the /etc/rc.d/rc.local file.  Be sure to comment
out the recreation steps in this script.


To display a message after a successful login,
edit the /etc/motd file.

The /etc/motd file is displayed just after a user
has successfully logged in, before they receive a
shell prompt.


To run a program after a successful login, edit
the /etc/profile (for all users) or
~/.bash_profile (for an individual user), for all
users using the bash shell.  There are other such
scripts for users of other shells.

The /etc/profile script is executed by every user
once they have logged in.  The "fortune" program
can be inserted in this script if you'd like
every user to see a fortune.

The /etc/.bash_profile script is executed by each
user once they have logged in.  If an individual
user wanted to run a program once he logged in,
this would be the place to put it.

Once again, the above are only for users using
the bash shell.  If you're using tcsh or zsh,
read the man pages for the appropriate files.


Don Head             [[EMAIL PROTECTED]]
Linux Mentor, LCA, Network+       [1 314 692-1942]
Wave Technologies, Inc.     [1 800 826-4640 x1942]
[AIM - Don Wave][ICQ - 18804935][Yahoo - Don_Wave]

Reply via email to