Find the answer to your Linux question:
Results 1 to 10 of 10

Thread: Login message

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Login message


    I was wondering how to create a login message to all my users when they access my box via shell. I have seen alot of different shells and mine is the only one that drops you in a user@local >

    I would like a message to come up and then ask for the login info.

    I am running RH 9 will all the updates if that helps any. Thanks

  2. #2
    edit your /etc/motd file to whatever message you wan't to be displayed when you log in

  3. #3
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    if you want the message to be displayed BEFORE they are asked for their password, then check your sshd.conf file, i beleive most ssh'es print out the file /etc/issue.net before requesting authentication, you may need to restart your sshd if you modify the sshd.conf config file.

    Jason

  4. $spacer_open
    $spacer_close
  5. #4
    Yeah i want it before the SSH login. I will try to edit that sshd.conf file or is it the /etc/issue.net file?

    Thanks

    PS Ill look at both anyway!

  6. #5
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    Quote Originally Posted by SPLMACHINEWORK
    Yeah i want it before the SSH login. I will try to edit that sshd.conf file or is it the /etc/issue.net file?

    Thanks

    PS Ill look at both anyway!
    sshd.conf is the config file that says what file (default /etc/issue.net) should be displayed to the user. As every distro packages sshd differently, those are general guidelines only.

  7. #6
    Well after a bit of work I discovered that for Redhat 9, the message that you get BEFORE you login via shell is in etc/motd.

    IE- (in the below format)

    xxxxxx
    xxxxxx
    xxxxxx

    Login: ......


    Hope this helps others too!

  8. #7
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    What J was referring to for ssh is in your sshd_config. All you do is edit/add a line saying:

    Code:
    Banner /path/to/banner.txt
    for an ssh banner. /etc/motd works as well, I guess.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  9. #8
    Can you not just edit /etc/issue and put whatever you want in there?

  10. #9
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,798
    I would use /etc/issue and /etc/issue.net because they don't get over written on reboot like motd (Message Of The Day) does.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  11. #10
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,732
    Thread is almost 4 years old, locking...
    oz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •