LinuxMall.com Got Linux? CD Offer
Newbie's Linux Manual
Customising Your Login Message
by Laurence Hunter
[ Home ] [ Contents ] [ Download*] [ Previous ] [ Next ]
* In Linux enter: unzip nlm.zip
Trivial but Nice

Pretty trivial this, but nice all the same.

- 1 -

Enter:

su -c "pico /etc/issue"

...and change the contents of the text file to whatever you want.

- 2 -

Press Ctrl+O to save the file, then Ctrl+X to exit.

- 3 -

When you reboot Linux the login message and the /etc/issue file you've just edited will return to the default. To prevent this, enter:

su -c "pico /etc/rc.d/rc.local"

...and begin each of the following lines (indicated in bold) with a hash (#) character so that Linux ignores them. If at any time you want the default login message to return, simply remove the offending hash characters.

# This will overwrite /etc/issue at every boot. So, make any changes you
# want to make to /etc/issue here or you will lose them when you reboot.
# echo "" > /etc/issue
# echo "$R" >> /etc/issue
# echo "Kernel $(uname -r) on $a $(uname -m)" >> /etc/issue

# cp -f /etc/issue /etc/issue.net
# echo >> /etc/issue
fi

- 4 -

Press Ctrl+O to save the file, then Ctrl+X to exit.

- 5 -

Either press Ctrl+D to log-out, or press Alt+F2 to switch to the second virtual terminal to see your new improved login message!

[ Home ] [ Contents ] [ Download*] [ Previous ] [ Next ]
* In Linux enter: unzip nlm.zip

W W W . L I N U X D O T . O R G

The Newbie's Linux Manual is reproduced on LinuxMall.com by permission. The Newbie's Linux Manual is written and maintained by Laurence Hunter. You can find much more of Laurence's work at his site: www.Linuxdot.org

© 1999 Linuxdot.org | Manual's Copyright Terms