geekvenue.net

Welcome to Chucktips Hardware HELP WITH DEAD OS Installing FreeBSD Miscellaneous
 faq
 search
 add article
 cool-stuff
 how-to
 main
 tips


TIP: Customize your login
Miscellaneous Posted by Jason on Monday December 10, @11:36AM
from the why-not dept.
There are many ways to customize your login. The two I will discuss are issue and motd, issue controls what will be displayed before the login prompt, and motd displays it's contents after a user logs on to the system.

In the file /etc/motd you will find the contents of the default motd (message of the day). Whatever text is in this file will be displayed after a user logs on to the system. To have it display a custom message, simply replace it's current content with your own text. Commonly you will see an motd something like this: Welcome to server F44lab at geekvenue.net

Using the issue file is less straight forward if you are not running FreeBSD 4.4-RELEASE or better. That's because issue is called from your /etc/gettytab file. You should check your gettytab file and see if the default tag has an if (input file) statement specified. This is done for you in FBSD-4.4, here is what it looks like:

default:\
    :cb:ce:ck:lc:fd#1000:im=\r\n%s/%m (%h) (%t)\r\n\r\n:sp#1200:\
    :if=/etc/issue:


If you need to modify your gettytab file, I strongly recommend you be extremely careful and make a backup copy of the file first:

cd /etc
cp gettytab gettytab-dist

Now create a text file called issue in your /etc directory with any text you would like displayed before users log on to the system. All you have to do to test if it works is logout, your message should be displayed above the standard login prompt.

If you really want to get fancy install the figlet app from the ports tree (/usr/ports/misc/figlet) and generate some figlet'd text to display like so:

figlet F44lab>/etc/issue
exit

If you are unfamilar with figlet, you should take a look at it. It is a very small program that will generate large charachters made up of regular screen characters. It is often used to make interesting email signatures.


To get more information on these commands, check the man pages:

man motd
man figlet
man gettytab


<  |  >

 

Related Links
  • Articles on Miscellaneous
  • Also by Jason
  • Contact author

    Lilliput Mini USB Computer Monitor

    If you have ever wanted to learn about Cisco Routers, check out my new book "Cisco Routers for the Small Business" - it's Cisco CLI for the Regular Guy!

  • Sponsors

    The Fine Print: The following comments are owned by whoever posted them.
    ( Add a Reply )

    Re: TIP: Customize your login
    by Lucas on Wednesday December 12, @09:05AM

    Hi Jason, anyone else,

    Long time ago, I used to to do all my mail in pine. When I would logOUT a different quote would comeup just before the new login session. The quotes were mostly science related. Most were funny. I was wondering if there is anyway to recreate this, whether loging in or out and what quotes are availible.

    Great site Jason.

    Lucas


    [ Add a Reply to this ]
    • Re: TIP: Customize your login
      by Jason on Wednesday December 12, @03:50PM
      The application that displays quotes is fortune, it is in the ports tree under /usr/ports/misc/fortuneit (if not already installed). For rather funny quotes try fortune zippy (as in Zippy the Pinhead). By contrast, if you would like useful information try, fortune freebsd-tips.

      You can place these commands in your .profile to have them display during login.

      Hope this helps?

      Thank you for the kind words
      [ Reply to this ]

     
    The Fine Print: The following comments are owned by whoever posted them.
    ( Article Reply )

    "You never know how many friends you have until you own a Condo on the beach." -- Jason's Postulate

    Powered by Zope  Powered by Apache  Squishdot Powered
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©2001 Jason Neumann.
    [ main | post article | search ]