Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Welcome Message on Boot
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
BWW
n00b
n00b


Joined: 05 May 2002
Posts: 34
Location: Oklahoma

PostPosted: Thu Sep 19, 2002 1:41 am    Post subject: Reply with quote

Phong...that is nice.
_________________
Registered Linux User #251974
Back to top
View user's profile Send private message
debian
n00b
n00b


Joined: 24 Jun 2002
Posts: 22

PostPosted: Mon Sep 23, 2002 6:43 am    Post subject: Do not say "Welcome" in welcome message Reply with quote

That was a funny case I've read in some government forums.

If you've ever sought FBI's help in securing your servers/routers(after you've been hacked and your lost exceeds $5000) then the first thing they'll tell you is to remove all welcome messages that sound so 'inviting'. E.g. "Welcome to...." "Greetings!" "Enjoy your stay in....", etc.

There was a case that a guy lost his legal ground in suing a cracker because he had explicitly granted right to others to enter his server(router? can't recall).

We were ordered to remove all 'inviting' message in public servers and routers when I were working at IBM.

The welcome message recommended(by FBI?) is like "Only authorized personnel is allowed to access to.....you forfeit your legal right by...." something like that. I lost the exact message already, but it sounds scary. :)

Of course, I think a penguin picture is okay. :)
Back to top
View user's profile Send private message
debian
n00b
n00b


Joined: 24 Jun 2002
Posts: 22

PostPosted: Mon Sep 23, 2002 6:52 am    Post subject: Example "Welcome" message that doesn't sound so in Reply with quote

I think I found one example I note previously that shall be used in production server:

Code:
     THIS IS A DEPARTMENT OF DEFENSE COMPUTER SYSTEM. THIS COMPUTER SYSTEM,
     WHICH INCLUDES ALL RELATED EQUIPMENT, NETWORKS AND NETWORK DEVICES
     (SPECIFICALLY INCLUDING ACCESS TO THE INTERNET), ARE PROVIDED ONLY FOR
     OFFICIAL U.S. GOVERNMENT BUSINESS.

     DOD COMPUTER SYSTEMS MAY BE MONITORED BY AUTHORIZED PERSONNEL TO ENSURE
     THAT THEIR USE IS AUTHORIZED, FOR MANAGEMENT OF THE SYSTEM, TO FACILITATE
     PROTECTION AGAINST UNAUTHORIZED ACCESS, AND TO VERIFY SECURITY PROCEDURES.
     MONITORING INCLUDES "HACKER" ATTACKS TO TEST OR VERIFY THE SECURITY OF
     THIS SYSTEM AGAINST USE BY UNAUTHORIZED PERSONS. DURING THESE ACTIVITIES,
     INFORMATION STORED ON THIS SYSTEM MAY BE EXAMINED, COPIED AND USED FOR
     AUTHORIZED PURPOSES, AND DATA OR PROGRAMS MAY BE PLACED INTO THIS SYSTEM.
     THEREFORE, INFORMATION YOU PLACE ON THIS SYSTEM IS NOT PRIVATE.

     USE OF THIS DOD COMPUTER SYSTEM, AUTHORIZED OR UNAUTHORIZED, CONSTITUTES
     CONSENT TO OFFICIAL MONITORING OF THIS SYSTEM. UNAUTHORIZED USE OF A DOD
     COMPUTER SYSTEM MAY SUBJECT YOU TO CRIMINAL PROSECUTION. EVIDENCE OF
     UNAUTHORIZED USE COLLECTED DURING MONITORING MAY BE PROVIDED TO APPROPRIATE
     PERSONNEL FOR ADMINISTRATIVE, CRIMINAL OR OTHER ACTION.


Message as such is not only to scare people away, but also protect your legal grounds.

Yeah, I know it's the most boring welcome message you'd prefer. :P
Back to top
View user's profile Send private message
BWW
n00b
n00b


Joined: 05 May 2002
Posts: 34
Location: Oklahoma

PostPosted: Mon Sep 23, 2002 12:56 pm    Post subject: Reply with quote

Such are the times, I guess.
_________________
Registered Linux User #251974
Back to top
View user's profile Send private message
Netdale
n00b
n00b


Joined: 25 May 2002
Posts: 67
Location: Lancaster, Pa

PostPosted: Wed Sep 25, 2002 10:57 am    Post subject: Reply with quote

What does this line do for u??

Code:
cp -f /etc/issue /etc/issue.net


Dale
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Wed Sep 25, 2002 8:40 pm    Post subject: Reply with quote

when people telnet or ssh into your system, they don't have anything but a vt100 or ansi terminal. So, the issue.net file is shown instead of issue.

That simply copies the issue to issue.net, making them identical.
If you don't do anything fancy that only works on direct console, then that's alright. (I haven't found anything that I do)
or if you wanna warn people that they are being monitored when coming in from the net, the issue.net is where ya do it.
Back to top
View user's profile Send private message
Cassini
n00b
n00b


Joined: 16 Sep 2002
Posts: 14
Location: Iceland

PostPosted: Mon Sep 30, 2002 3:51 pm    Post subject: Messages on login Reply with quote

If you would like to make a nice message on boot you need to edit the .bashrc file found in the users ~. I have no idea if there is a global one to. :D
_________________
Reason is immortal, all else mortal.
-Pythagoras
Back to top
View user's profile Send private message
dreamsofxion
n00b
n00b


Joined: 29 Sep 2002
Posts: 37
Location: Memphis, TN

PostPosted: Wed Oct 16, 2002 8:02 pm    Post subject: Reply with quote

Well...for a global boot message, that's what this thread seems to be about...

...but as you used the term "users" in your post, I'll assume that you mean that you want a login message - a message displayed for all users when they log in...

...and that's as simple as editing your /etc/motd file. If it doesn't exist, create one and...voila...when you log in...you get the Message of the Day...
Back to top
View user's profile Send private message
Phildeeze
n00b
n00b


Joined: 31 Jul 2002
Posts: 10

PostPosted: Sat Dec 07, 2002 12:37 am    Post subject: Reply with quote

lain iwakura wrote:

#!/bin/sh
# Local system initialization script
RELEASE="Release 1.1a"

COLOR1="\033[1;6m\033[32;40m" # bright green on black
COLOR2="\033[1;6m\033[34;40m" # bright purple on black
COLOR3="\033[1;6m\033[31;40m" # bright red on black
COLOR4="\033[1;6m\033[33;40m" # bright yellow on black

rm -f /etc/issue
/usr/bin/linux_logo -c -f>>/etc/issue
echo -e $COLOR1"Gentoo"$COLOR2 "Linux" $COLOR4"$RELEASE" $COLOR_RESET"(\l)">>/etc/issue
echo -e $COLOR3"Welcome to the Wired!">>/etc/issue
echo >>/etc/issue
cp -f /etc/issue /etc/issue.net



When I boot with this script I get '/sbin/rc: /mnt/.init.d/softscripts/issue: /bin/sh: bad interpreter: Permission denied' :cry:
Back to top
View user's profile Send private message
riceboy50
n00b
n00b


Joined: 12 Nov 2002
Posts: 48
Location: Southern CA

PostPosted: Tue Dec 10, 2002 5:53 am    Post subject: Reply with quote

Have you tried making the first line read #!/bin/bash instead of #!/bin/sh ?
I have no idea if that will help.
_________________
I am logged on therefore I am...
Back to top
View user's profile Send private message
riceboy50
n00b
n00b


Joined: 12 Nov 2002
Posts: 48
Location: Southern CA

PostPosted: Tue Dec 10, 2002 5:57 am    Post subject: Re: Messages on login Reply with quote

Cassini wrote:
If you would like to make a nice message on boot you need to edit the .bashrc file found in the users ~. I have no idea if there is a global one to. :D


As long as you have:

# Source global definitions
if [ -f /etc/profile ]; then
. /etc/profile
fi

in your .bashrc file within the home directories you will grab the global settings in /etc/profile
_________________
I am logged on therefore I am...
Back to top
View user's profile Send private message
flow
n00b
n00b


Joined: 11 Dec 2002
Posts: 2
Location: Oslo, Norway

PostPosted: Wed Dec 11, 2002 8:09 pm    Post subject: Use the gentoo-release file! :) Reply with quote

The Gentoo release version is ofcourse already available on your system. Therefor you can just parse the /etc/gentoo-release file and add it to your Linux_Logo :wink:

Code:

#!/bin/sh
# Local system initialization script
/usr/bin/clear >> /etc/issue
COLOR1="\033[1;6m\033[32;40m" # bright green on black
COLOR2="\033[1;6m\033[34;40m" # bright purple on black
COLOR3="\033[1;6m\033[31;40m" # bright red on black
COLOR4="\033[1;6m\033[33;40m" # bright yellow on black
COLOR_RESET="\033[0m"         # reset colours

rm -f /etc/issue
/usr/bin/linux_logo -L 3 -f -t "`cat /etc/gentoo-release`" >>/etc/issue
echo -e $COLOR_RESET >>/etc/issue
cp -f /etc/issue /etc/issue.net


It really isn't that much harder to display the Gentoo release version in several colours if you for example use awk/gawk to parse the gentoo-release file, but personally I liked this method best.
Back to top
View user's profile Send private message
Twink
Apprentice
Apprentice


Joined: 06 Dec 2002
Posts: 178
Location: New Zealand

PostPosted: Thu Dec 12, 2002 4:53 am    Post subject: Reply with quote

I love this, however I don't really see the point in an uptime message if the computer is a server and not logged into much, as it only updates if you login then log back out, all my terminals all show different uptimes
Back to top
View user's profile Send private message
alspnost
n00b
n00b


Joined: 25 Feb 2003
Posts: 18
Location: Suffolk, UK

PostPosted: Sat Mar 01, 2003 12:24 am    Post subject: A snazzy compact login banner (/etc/issue) Reply with quote

So, here goes my first Gentoo forum post! :lol:

I was playing around tonight and knocked up my own little /etc/issue script, which creates a little purple "g" Gentoo logo and a few lines of relevant banner text. Obviously, feel free to hack and improve it as you want....

[code]
#!/bin/bash

# AL's custom console greeting script for Gentoo Linux

# 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.

if [ -f /etc/gentoo-release ]; then
printf "\e[2J\e[H" > /etc/issue

R=$(cat /etc/gentoo-release | awk '{ print $5,$6 }')
C=$(cat /proc/cpuinfo | grep 'el na' | awk '{ print $5,$6,$7 }')
K=$(uname -r)
H=$(/bin/hostname -f)
M=$(( `dmesg | grep "Dentry" | awk '{print $9}'` / 1024 ))
KS=`dmesg | grep "Swap" | awk '{print $3}'`
S=$(( ${KS%k} / 1024 ))

DARK="\033[1;30m" # dark grey
GREY="\033[0m" # default grey / white
WHITE="\033[1;37m" # bright / bold white
PURPLE="\033[0;35m" # purple
BR_GREEN="\033[1;32m" # bright green
BR_BLUE="\033[1;34m" # bright blue

echo -e "$PURPLE _,-=-." >> /etc/issue
echo -e "$PURPLE ( \`. $BR_GREEN Gentoo$BR_BLUE Linux$GREY release $R" >> /etc/issue
echo -e "$PURPLE \`\\\\\ () ) $GREY Kernel$WHITE $K" >> /etc/issue
echo -e "$PURPLE > /' $GREY $C processor" >> /etc/issue
echo -e "$PURPLE /' ,/' $GREY"$M"Mb memory / "$S"Mb swap" >> /etc/issue
echo -e "$PURPLE (__.=~ $DARK ______________________________________$GREY" >> /etc/issue
echo "" >> /etc/issue
fi
[/code]

Hope it works for you - enjoy!

-Alastair (a brand new Gentoo convert from Cambridge, UK)[color=darkred][/color]
Back to top
View user's profile Send private message
ozt
Apprentice
Apprentice


Joined: 13 Dec 2002
Posts: 212
Location: Stockholm

PostPosted: Sat Mar 01, 2003 10:31 am    Post subject: Reply with quote

emerge Welcome2l

rc-update add Welcome2l default
Back to top
View user's profile Send private message
RoelVanDijk
n00b
n00b


Joined: 15 Dec 2002
Posts: 21

PostPosted: Wed Mar 12, 2003 12:39 pm    Post subject: Reply with quote

Very simple trick. Makes the cow say a fortune cookie.
Code:
echo -e "$(cowsay "$(fortune)")" >> /etc/issue

I thought it was nice :)
Code:

______________________________________
/ When you're not looking at it, this \
\ fortune is written in FORTRAN.      /
 -------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

note:
Fortune can sometimes print HUGE messages. Prevent this with
Code:
fortune -n 100 -s

This makes fortune print only messages shorter then 100 character. You can ofcourse change this number.
Back to top
View user's profile Send private message
Roderik
n00b
n00b


Joined: 06 Jun 2002
Posts: 55
Location: Belgium

PostPosted: Thu Mar 13, 2003 1:01 pm    Post subject: Reply with quote

i've taken my swing at something like this

using alspnost code as base and the ascii G on page 1

Output:
Code:

       __q@@@@m_
     _q@@@@@@@@@@_
    _@@@@@@@@@@@@@@m         Gentoo Linux release 1.4.2.8
   q@@@@@@@@@@@@@@@@@_
  _@@@@@@@@@@##@@@@@@@h      Hostname:  ashlar.mayfair.ro
  @@@@@@@@@@@ ##@@@@@@@@_
  7##@@@@@@@___@@@@@@@@@@,   Kernel:    2.4.20-gentoo-r1
    ####@@@@@@@@@@@@@@@@@@   Processor: AMD Athlon(tm) Processor ( 750.254 MHz => 1470.46 bogomips)
      ####@@@@@@@@@@@@@@@@   Memory:    512 Mb
       q@@@@@@@@@@@@@@@@#W   Swap:      972 Mb
      q@@@@@@@@@@@@@@@@@@/
    _@@@@@@@@@@@@@@@@#@@     Uptime:    13:58:43 up  1:39,  3 users,  load average: 0.00, 0.00, 0.00
   q@@@@@@@@@@@@@@@#@##^
  m#@@@@@@@@@@@@@@#@#W
 _q@@@@@@@@@@@@@#@#*>        Unauthorized users _WILL_ be shot!
  p@@@@@@@@@@@#@##%
   _##@@@@@##@#@#g
     _#@@@@@@#@@
       _p@@@@q

  Fry: Leela, Bender, we're going grave-robbing.
 Bender: I'll get my kit!


Script:
Code:

#!/bin/bash

if [ -f /etc/gentoo-release ]; then
        printf "\e[2J\e[H" > /etc/issue

        R=$(cat /etc/gentoo-release | awk '{ print $5,$6 }')
        C=$(cat /proc/cpuinfo | grep 'model name' | awk '{ print $4,$5,$6 }')
        CS=$(cat /proc/cpuinfo | grep 'cpu MHz' | awk '{ print $4 }')
        CB=$(cat /proc/cpuinfo | grep 'bogomips' | awk '{ print $3 }')
        K=$(uname -r)
        H=$(/bin/hostname -f)
        M=$(( `dmesg | grep "Dentry" | awk '{print $9}'` / 1024 ))
        KS=`dmesg | grep "Swap" | awk '{print $3}'`
        S=$(( ${KS%k} / 1024 ))
        U=$(uptime)
        F=$(fortune -n 80  -s)

        DARK="\033[1;30m" # dark grey
        GREY="\033[0m" # default grey / white
        WHITE="\033[1;37m" # bright / bold white
        PURPLE="\033[0;35m" # purple
        BR_GREEN="\033[1;32m" # bright green
        BR_BLUE="\033[1;34m" # bright blue

        echo -e "$PURPLE       __q@@@@m_" >> /etc/issue
        echo -e "$PURPLE     _q@@@@@@@@@@_" >> /etc/issue
        echo -e "$PURPLE    _@@@@@@@@@@@@@@m        $BR_GREEN Gentoo$BR_BLUE Linux$GREY release $R" >> /etc/issue
        echo -e "$PURPLE   q@@@@@@@@@@@@@@@@@_" >> /etc/issue
        echo -e "$PURPLE  _@@@@@@@@@@##@@@@@@@h     $GREY Hostname: $WHITE $H" >> /etc/issue
        echo -e "$PURPLE  @@@@@@@@@@@ ##@@@@@@@@_" >> /etc/issue
        echo -e "$PURPLE  7##@@@@@@@___@@@@@@@@@@,  $GREY Kernel:   $WHITE $K" >> /etc/issue
        echo -e "$PURPLE    ####@@@@@@@@@@@@@@@@@@  $GREY Processor:$WHITE $C ( $CS MHz => $CB bogomips)" >> /etc/issue
        echo -e "$PURPLE      ####@@@@@@@@@@@@@@@@  $GREY Memory:   $WHITE $M Mb" >> /etc/issue
        echo -e "$PURPLE       q@@@@@@@@@@@@@@@@#W  $GREY Swap:     $WHITE $S Mb" >> /etc/issue
        echo -e "$PURPLE      q@@@@@@@@@@@@@@@@@@/" >> /etc/issue
        echo -e "$PURPLE    _@@@@@@@@@@@@@@@@#@@    $GREY Uptime:  $WHITE $U" >> /etc/issue
        echo -e "$PURPLE   q@@@@@@@@@@@@@@@#@##^" >> /etc/issue
        echo -e "$PURPLE  m#@@@@@@@@@@@@@@#@#W" >> /etc/issue
        echo -e "$PURPLE _q@@@@@@@@@@@@@#@#*>       $BR_GREEN Unauthorized users _WILL_ be shot!" >> /etc/issue
        echo -e "$PURPLE  p@@@@@@@@@@@#@##%" >> /etc/issue
        echo -e "$PURPLE   _##@@@@@##@#@#g" >> /etc/issue
        echo -e "$PURPLE     _#@@@@@@#@@" >> /etc/issue
        echo -e "$PURPLE       _p@@@@q" >> /etc/issue
        echo "" >> /etc/issue
        echo -e "$BR_GREEN $F" >> /etc/issue
        echo "" >> /etc/issue
fi



and i added "5 * * * * /etc/init.d/issue" to my crontab to update the uptime and fortune every 5 minutes.

Note: The /proc/cpuinfo says Athlon(tm) Processor so i don't have to manually add "processor" to the script, maybe for your cpu you will have to add it.
_________________
"Never argue with an idiot, they'll drag you down to their level and beat you with experience."
Back to top
View user's profile Send private message
bumpus
n00b
n00b


Joined: 14 Feb 2003
Posts: 64
Location: Cedar Rapids, IA, USA

PostPosted: Tue Apr 08, 2003 4:18 pm    Post subject: Reply with quote

Quote:
i added "5 * * * * /etc/init.d/issue" to my crontab to update the uptime and fortune every 5 minutes.


I think that the crontab line you're looking for is */5 * * * * /etc/init.d/issue which will run the /etc/init.d/issue script every five minutes. The line you have will run the script every hour at five past.
_________________
-------------
Just because I can.
Back to top
View user's profile Send private message
Niek
Apprentice
Apprentice


Joined: 14 May 2002
Posts: 236
Location: Houten, The Netherlands

PostPosted: Tue Apr 08, 2003 6:50 pm    Post subject: Reply with quote

Code:
emerge app-misc/Welcome2L

Try this program, it features a really cool welcome screen :)
_________________
Bezoek ook eens de Nederlandstalige Gentoo IRC channel op irc.freenode.net - #gentoo-nl
Back to top
View user's profile Send private message
therobot
Apprentice
Apprentice


Joined: 07 Jun 2002
Posts: 256
Location: Canada

PostPosted: Tue Apr 08, 2003 11:03 pm    Post subject: Reply with quote

when I try this, i get
Code:
manmachine root # rc-update add issue default
 * issue not executable; skipping
 * Caching service dependencies...                                        [ ok ]
 * rc-update complete.

anybody know how to fix this?
Back to top
View user's profile Send private message
danbee
n00b
n00b


Joined: 24 Feb 2003
Posts: 42

PostPosted: Wed Apr 09, 2003 11:42 am    Post subject: Reply with quote

make /etc/init.d/issue executable
_________________
:: danbee :: www.pixelhum.com ::
Back to top
View user's profile Send private message
therobot
Apprentice
Apprentice


Joined: 07 Jun 2002
Posts: 256
Location: Canada

PostPosted: Wed Apr 09, 2003 11:57 am    Post subject: Reply with quote

Code:
manmachine root # make /etc/init.d/issue executable
make: Nothing to be done for `/etc/init.d/issue'.
make: *** No rule to make target `executable'.  Stop.
Back to top
View user's profile Send private message
danbee
n00b
n00b


Joined: 24 Feb 2003
Posts: 42

PostPosted: Wed Apr 09, 2003 12:09 pm    Post subject: Reply with quote

therobot wrote:
Code:
manmachine root # make /etc/init.d/issue executable
make: Nothing to be done for `/etc/init.d/issue'.
make: *** No rule to make target `executable'.  Stop.


lol! no, it wasn't a command. you actually want to type:

Code:
chmod 755 /etc/init.d/issue


that will make the file /etc/init.d/issue executable
_________________
:: danbee :: www.pixelhum.com ::
Back to top
View user's profile Send private message
therobot
Apprentice
Apprentice


Joined: 07 Jun 2002
Posts: 256
Location: Canada

PostPosted: Wed Apr 09, 2003 10:48 pm    Post subject: Reply with quote

haha, ya, I realized that after sleeping a while...
thanks
Back to top
View user's profile Send private message
compuboy86
Tux's lil' helper
Tux's lil' helper


Joined: 03 Apr 2003
Posts: 79

PostPosted: Tue Apr 29, 2003 4:00 am    Post subject: ack! Reply with quote

Ok, I'm having a bit of difficulty setting this up. Here is the process I took:

Code:

touch /etc/init.d/motd (message of the day)
nano -w /etc/init.d/motd


At this point I copied the entireity of the nice gentoo image and processor specs, etc word for word. (The poster escapes me atm)

I also used chmod 755 /etc/init.d/motd then copied that to /etc/motd. However, it prints out EXACTLY the text with all the code as well. It doesn't parse it. Any ideas??

-Compuboy86

EDIT: My mistake, I had #!/bin/sh instead of #!/bin/bash...now the error I get is
Code:

line 13: Unexpected BOF while looking for matching `' '
line 57: syntax error: unexpected at end of file
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum