LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   show motd on login (https://www.linuxquestions.org/questions/debian-26/show-motd-on-login-258423/)

pirozzi 11-23-2004 12:07 PM

show motd on login
 
first of all sorry for the extremely silly question.
using slack i get used to read this message. is it possible to have it printed on the screen just after the login? how?
thanks and i beg your pardon

Tuttle 11-23-2004 12:21 PM

have you tried modifying /etc/motd?

edit: also -

chmod a-x /etc/profile.d/bsd-games-login-fortune.sh

this gets rid of the random message at login.

pirozzi 11-25-2004 02:15 AM

in my /etc/motd there's nothing but the very standard welcome message.
on the other hand i've nor a folder /profile.d, nor a file called bsd-games-login-fortune.sh

overlord73 11-25-2004 02:35 AM

where do you want to show the message? what are you talking about: linux login or dedi-game-server-login?
in the case of normal linux login, edit /etc/motd!

pirozzi 11-25-2004 05:00 AM

i'm talking about linux login.
the problem is what to do after editing the file. should i add something i soppose, but i don't know what.

abisko00 11-25-2004 05:14 AM

Don't know if this is a SuSE speciality, but the /etc/motd to be called by login is defined in /etc/login.def (managed by pwdutils).
Should be set like this:
Code:

MOTD_FILE        /etc/motd

pirozzi 11-25-2004 05:44 AM

this is what i found in my /etc/motd

Linux foo 2.4.22-1-686 #6 Sat Oct 4 14:09:08 EST 2003 i686 GNU/Linux
Most of the programs included with the Debian GNU/Linux system are
freely redistributable; the exact distribution terms for each program
are described in the individual file in /usr/share/doc/*/copyright
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

what i'm tring to do is set the system in order to print a randon massege at the linux login.

overlord73 11-25-2004 06:36 AM

hmmm, the default /etc/motdīs of my last installed boxes were empty.
donīt know whats with the current debian version !?!
under FC all you have to do is: edit the empty motd-file, switch to another console and login...

so what happens, when you edit this file under your debian?

pirozzi 11-25-2004 08:09 AM

overlord73 i still can't understand what you actually mean with edit. i can open the motd file but i still don't know what to do in it. should i delete the actual contents, maybe?

abisko00 11-25-2004 09:17 AM

/etc/motd is just a textfile that is displayed on login. So if you want it to change on each login, you will need to find a program that does this job (I don't know any, sorry), or change (edit) it yourself each time.

masterJ 11-25-2004 09:36 PM

That's default on Slack, and it uses a program called fortune to display this. Try this:
apt-get fortune-mod
Not sure if you'll have to modify anything to get it to run on each logon, though - maybe read the man pages once it's installed....

empiika 12-15-2004 10:40 AM

if your that desparate to get the fortune thing on debian..
a quick hack would be to :

apt-get install fortune

and then.. edit :

/etc/profile

and add the path to fortune to the bottom of the file

/usr/games/fortune

..in my case (should be the same really :P)

..and that should execute fortune wen you log on, hope that helps :D


All times are GMT -5. The time now is 09:23 AM.