~ubuntu-branches/ubuntu/utopic/linuxlogo/utopic

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
Usage tricks:

   Generic
      A1 ). Having the tty printed when used at login.
      A2 ). Having an ascii logo for network login.
      A3 ). Creating a "penguin port" on your computer.
      A4 ). Confusing script-kiddies

   Distribution Specific
      B1 ). Slackware 
      B2 ). OpenLinux
      B3 ). Redhat
      B4 ). Debian
      B5 ). SUSE

####################################################################
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A1). Having the tty printed on the login prompt


   From Martin Bayer:


   In order to have the tty indicated at the login prompt, I use some
   issue(5) parameters, running linux_logo with the following options:
   (this is intended to be one line, remove the comment!)

      /usr/local/bin/linux_logo -F'Welcome to SuSE Linux 7.0 on #H, \\l \n
# note the double backslash                                         ^^^
      running #O #V, compiled on #C. \n This is a #M #X #T with #R RAM. \n'
      >/etc/issue


##################################################################
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A2). Having an ascii logo for network login

        Note: for platforms that do not have color ansi telnet connections
	you might want to use the "linux_logo -a" option.  This gives
	a plain ascii [though less exciting and uglier] output.  
	
	To add this functionality, add the following to your bootup scripts
	 
	      /usr/local/bin/linux_logo -a > /etc/issue.net
	 
	If you are not sure where your bootup scripts are, see the
	"distribution specific" hints towards the end of this document.

###################################################################
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A3) You can create a "Penguin Port"
	
	That is, set up a port on your Linux box to answer connections
         with the linux_logo penguin! 
	 
         Add the following line to /etc/services
	     
	       penguin         54321/tcp        penguin
	     
	 The port number you pick [here 54321] is arbitrary.  Just be
	 sure not to pick on that will conflict with others in the file.
	     
	 Add the following line to /etc/inetd.conf
	    
	      penguin stream  tcp     nowait  root   /usr/local/bin/linux_logo
	    
         Restart inetd (killall -HUP inetd) and you have it!!
	 
	 Locally "telnet localhost penguin" will do it.  From other machines
	 you will need the port number ("telnet localhost 54321").. it is easy
	 to customize.. just pick a port number and away you go!


#################################################################
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A4) Confusing script kiddies!

    Many distributions turn off linux_logo if you pick "most secure" at
    installation time.  This is because letting others know your processor,
    memory type, and kernel version can make it easier for you to be attacked
    by outsiders.
    
    Instead of disabling linux_logo, why not use it as a weapon to confuse
    those who might attack you?  For example with
    
       linux_logo -F "Linux Version 2.7.105, Compiled ##45 Tue Feb 13 13:40:15 \
       EST 2001\nTwelve 10Ghz Heuristic ALgorithmic Model 9000 Processors\n \
       14TB Holographic Memory, 426789.4 BogoMips Total\nhal.uss.discovery"
 
    in your bootup scripts, the attackers may think they have logged into the
    killer machine from Clark's "2001" series of novels!  Watch the hilarity
    that ensues as they try to find a proper exploit!


#################################################################
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

B1). FOR SLACKWARE
        Add the following lines to /etc/rc.d/rc.M 
		
       /usr/local/bin/linux_logo > /etc/issue
       /usr/local/bin/linux_logo > /etc/issue.net
  
      and the penguin appears at all the login prompts, even remote ones.
        
##################################################################
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	 
B2). FOR OPENLINUX

        Add the following lines to /etc/rc.d/rc.local
	
       /usr/local/bin/linux_logo > /etc/issue
       /usr/local/bin/linux_logo > /etc/issue.net
  
      and the penguin appears at all the login prompts, even remote ones.
      
###################################################################	
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
B3). FOR REDHAT


   Generic Login:
      
      REDHAT 7.x INSTRUCTIONS
      ~~~~~~~~~~~~~~~~~~~~~~~  
	 The /etc/issue file comes with the redhat-release package.
	 It is not updated every boot-up like in the 6.x series.
	 
	  One way to have linux_logo work is simply end the following
	  lines to the end of the file "/etc/rc.d/rc.local"
	              
	     if [ -f /usr/local/bin/linux_logo ]; then
                echo "" > /etc/issue
                /usr/local/bin/linux_logo -t "$R" >> /etc/issue
	        /usr/local/bin/linux_logo -a -t "$R" > /etc/issue.net
	        echo >> /etc/issue
	     fi

      REDHAT 6.x INSTRUCTIONS
      ~~~~~~~~~~~~~~~~~~~~~~~	
	 In the file /etc/rc.d/rc.local Look for the lines saying 
	 
           # 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.
    
           towards the middle of the file.  Comment out [by putting a # at the
	      start of each line] the following 6 lines, up to, but not
	      including,  the line that says 'fi'.
	 
	   Before the 'fi' put in the following lines:
	 
             if [ -f /usr/local/bin/linux_logo ]; then
                echo "" > /etc/issue
                /usr/local/bin/linux_logo -t "$R" >> /etc/issue
	        /usr/local/bin/linux_logo -a -t "$R" > /etc/issue.net
	        echo >> /etc/issue
	     fi
	
	This will give you a color linux_logo at the consoles, and an 
	ascii linux_logo when telnetting in.
	    
  ---------------------------------------------------------------	    
	
  Fancier Redhat options:	
	
      You can have it report Redhat version using the -t option
        (thanks to Aleksey Makarov <makarov _at_ iitam.omsk.net.ru>
	for this tip).
	     
      If you have redhat installed already, change

         /etc/rc.d/rc.local so where it says
     
             echo "" > /etc/issue
	     echo "Red Hat Linux $R" >> /etc/issue
	     echo "Kernel $(uname -r) on $a $(uname -m)" >> /etc/issue
			     
         comment it out [or delete it] and add instead put

            /usr/local/bin/linux_logo -f -t "$R" > /etc/issue
       
         For older versions of Redhat [older than 5.2] you might try
	    
	    /usr/local/bin/linux_logo -f -t "Red Hat $R" > /etc/issue
		   
	    
#####################################################################	    
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

B4): FOR DEBIAN: 

        [thanks to <rlovison _at_ simons-rock.edu> ]
        Nice program!  Just wanted to let you know how I used it within a 
	Debian system.  I have the logo appear above any text in the message 
	of the day and as long as the day's message remains under a few lines, 
	it works out wonderfully.  First I renamed the Debian default 
	/etc/motd, created a new one with touch motd', used the following 
	command:
	
            /usr/local/bin/linux_logo > /etc/motd 
	    
       and then added a line of text at the end of the file.  Next I edited 
       /etc/init.d/boot.  In the following lines which appear near the end 
       of the file:
     
           if [ "$EDITMOTD" != no ]
           then
               uname -a > /tmp/motd
	       sed 1d /etc/motd >> /tmp/motd
	       mv /tmp/motd /etc/motd
           fi
			     
      change the third line to:
      
	  /usr/local/bin/linux_logo > /tmp/motd
			     
      and the fourth line to:
			     
	 sed 1,18d /etc/motd >> /tmp/motd
			     
     and as long as EDITMOTD is set to yes at the beginning of the file, it
     should work.

########################################################################
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
B5): FOR SUSE:

      For version 7.3: [thanks to itzit <itzit _at_ atari.net>]

      Edit /etc/rc.d/boot.local file and add the
      following lines before "exit 0" line:
	     
      /usr/local/bin/linux_logo > /etc/issue
      /usr/local/bin/linux_logo -a > /etc/issue.net
				 				 

      [Older versions, thanks to Rodolfo Pilas <rodolfo@linux.org.uy>]
      
      Edit /sbin/init.d/boot.local file and add the
      following lines before "exit 0" line:
      
          /usr/local/bin/linux_logo > /etc/issue
	  /usr/local/bin/linux_logo -a > /etc/issue.net