~giuseppeterrasi-deactivatedaccount/wiki-ubuntu-it/help-repo

« back to all changes in this revision

Viewing changes to www/10.04/ubuntu/serverguide/it/pam_motd.html

  • Committer: Leo Iannacone
  • Date: 2011-04-30 16:06:52 UTC
  • Revision ID: l3on@ubuntu.com-20110430160652-p5rufesrmfuzge6k
Creato;
Aggiunti 10.10 - 10.04 - 8.04;
Aggiunti index;
Aggiunti css base;
Aggiunti favicon.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
3
<html xmlns="http://www.w3.org/1999/xhtml">
 
4
  <head xmlns="http://www.w3.org/1999/xhtml">
 
5
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 
6
    <title xmlns="">pam_motd</title>
 
7
    <link rel="stylesheet" href="../../libs/ubuntu-book.css" type="text/css" />
 
8
    <link rel="home" href="index.html" title="Guida a Ubuntu server" />
 
9
    <link rel="up" href="other-useful-applications.html" title="Capitolo 22. Altre utili applicazioni" />
 
10
    <link rel="prev" href="other-useful-applications.html" title="Capitolo 22. Altre utili applicazioni" />
 
11
    <link rel="next" href="etckeeper.html" title="etckeeper" />
 
12
    <link rel="copyright" href="/legal.html" title="Riconoscimenti e licenza" />
 
13
  </head>
 
14
  <link href="http://help.ubuntu-it.org/favicon.ico" rel="shortcut icon" />
 
15
  <body>
 
16
    <div id="page-border-left-repeat">
 
17
      <div id="page-border-right-repeat">
 
18
        <script type="text/javascript">
 
19
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
 
20
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
 
21
</script>
 
22
        <script type="text/javascript">
 
23
try {
 
24
var pageTracker = _gat._getTracker("UA-8147493-2");
 
25
pageTracker._trackPageview();
 
26
} catch(err) {}</script>
 
27
        <div id="page-border-top-repeat">
 
28
          <div id="header">
 
29
            <div id="header-navigation">
 
30
              <ul>
 
31
                <li>
 
32
                  <a href="http://www.ubuntu-it.org">Web</a>
 
33
                </li>
 
34
                <li>
 
35
                  <a href="http://wiki.ubuntu-it.org">Documentazione</a>
 
36
                </li>
 
37
                <li>
 
38
                  <a href="http://forum.ubuntu-it.org">Forum</a>
 
39
                </li>
 
40
                <li>
 
41
                  <a href="http://planet.ubuntu-it.org">Planet</a>
 
42
                </li>
 
43
              </ul>
 
44
            </div>
 
45
            <form action="http://help.ubuntu-it.org/10.04/ubuntu/search.php" id="cse-search-box">
 
46
              <div>
 
47
                <input type="text" name="s" size="28" title="search" />
 
48
                <input type="submit" value="Cerca" title="search" />
 
49
              </div>
 
50
            </form>
 
51
          </div>
 
52
        </div>
 
53
        <div>
 
54
          <div id="bodyarea">
 
55
            <div class="pagelocation"><a href="http://help.ubuntu-it.org/">Documentazione di Ubuntu</a> → <a href="http://help.ubuntu-it.org/10.04/ubuntu/">Ubuntu 10.04</a> → <span class="breadcrumb-link"><a href="index.html">Guida a Ubuntu server</a></span> → <span class="breadcrumb-link"><a href="other-useful-applications.html">Altre utili applicazioni</a></span> → <span class="breadcrumb-node">pam_motd</span></div>
 
56
            <div xmlns="http://www.w3.org/1999/xhtml" class="sect1" title="pam_motd">
 
57
              <div class="titlepage">
 
58
                <div>
 
59
                  <div>
 
60
                    <h2 class="title" style="clear: both"><a id="pam_motd"></a>pam_motd</h2>
 
61
                  </div>
 
62
                </div>
 
63
              </div>
 
64
              <p>Quando si esegue l'accesso con una versione server di Ubuntu, è possibile vedere dei messaggi giornalieri di informazioni (MOTD). Queste informazioni sono ricavate e visualizzate utilizzando diversi pacchetti:</p>
 
65
              <div class="itemizedlist">
 
66
                <ul class="itemizedlist" type="disc">
 
67
                  <li class="listitem">
 
68
                    <p><span class="emphasis"><em>landscape-common</em></span>: fornisce le librerie principali di <span class="application"><strong>landscape-client</strong></span>, che può essere utilizzato per la gestione di sistemi attraverso l'interfaccia web di <span class="emphasis"><em>Landscape</em></span>. Il pacchetto comprende l'utilità <span class="application"><strong>/usr/bin/landscape-sysinfo</strong></span> che può essere usata per recuperare informazioni visualizzate attraverso il MOTD.</p>
 
69
                  </li>
 
70
                  <li class="listitem">
 
71
                    <p>
 
72
        <span class="emphasis"><em>update-notifier-common:</em></span> is used to automatically update the MOTD via <span class="application"><strong>pam_motd</strong></span> module.
 
73
        </p>
 
74
                  </li>
 
75
                </ul>
 
76
              </div>
 
77
              <p>    
 
78
    <span class="application"><strong>pam_motd</strong></span> executes the scripts in <code class="filename">/etc/update-motd.d</code> in order based on the number 
 
79
    prepended to the script.  The output of the scripts is written to <code class="filename">/var/run/motd</code>, keeping the numerical order, 
 
80
    then concatenated with <code class="filename">/etc/motd.tail</code>.
 
81
    </p>
 
82
              <p>È possibile aggiungere delle informazioni dinamiche per il messaggio giornaliero. Per esempio, per aggiungere informazioni meteo locali:</p>
 
83
              <div class="itemizedlist">
 
84
                <ul class="itemizedlist" type="disc">
 
85
                  <li class="listitem">
 
86
                    <p>Installare il pacchetto <span class="application"><strong>weather-util</strong></span>:</p>
 
87
                    <pre class="screen">
 
88
<span class="command"><strong>sudo apt-get install weather-util</strong></span>
 
89
</pre>
 
90
                  </li>
 
91
                  <li class="listitem">
 
92
                    <p>L'utilità <span class="application"><strong>weather</strong></span> utilizza i dati METAR dalla «National Oceanic and Atmospheric Administration» e le previsioni meteo dal «National Weather Service». Per reperire informazioni locali è necessario il codice a 4 cifre ICAO. Per ottenere questo codice è possibile consultare il sito web del <a class="ulink" href="http://www.weather.gov/tg/siteloc.shtml" target="_top">National Weather Service</a>.</p>
 
93
                    <p>Benché il «National Weather Service» sia un'agenzia governativa degli Stati Uniti d'America, stazioni meteo sono disponibili in tutti il mondo. Informazioni meteorologiche potrebbero però non essere disponibili per tutte le località al di fuori del territorio americano.</p>
 
94
                  </li>
 
95
                  <li class="listitem">
 
96
                    <p>Creare il file <code class="filename">/usr/local/bin/local-weather</code>, un semplice script per usare <span class="application"><strong>weather</strong></span> con il proprio indicatore ICAO locale:</p>
 
97
                    <pre class="programlisting">
 
98
#!/bin/sh
 
99
#
 
100
#
 
101
# Prints the local weather information for the MOTD.
 
102
#
 
103
#
 
104
 
 
105
# Replace KINT with your local weather station.
 
106
# Local stations can be found here: http://www.weather.gov/tg/siteloc.shtml
 
107
 
 
108
echo
 
109
weather -i KINT
 
110
echo
 
111
 
 
112
</pre>
 
113
                  </li>
 
114
                  <li class="listitem">
 
115
                    <p>Rendere lo script eseguibile:</p>
 
116
                    <pre class="screen">
 
117
<span class="command"><strong>sudo chmod 755 /usr/local/bin/local-weather</strong></span>
 
118
</pre>
 
119
                  </li>
 
120
                  <li class="listitem">
 
121
                    <p>
 
122
        Next, create a symlink to <code class="filename">/etc/update-motd.d/98-local-weather</code>:
 
123
        </p>
 
124
                    <pre class="screen">
 
125
<span class="command"><strong>sudo ln -s /usr/local/bin/local-weather /etc/update-motd.d/98-local-weather</strong></span>
 
126
</pre>
 
127
                  </li>
 
128
                  <li class="listitem">
 
129
                    <p>
 
130
        Finally, exit the server and re-login to view the new MOTD.
 
131
        </p>
 
132
                  </li>
 
133
                </ul>
 
134
              </div>
 
135
              <p>
 
136
    You should now be greeted with some useful information, and some information about the local weather that may not be
 
137
    quite so useful. Hopefully the <span class="application"><strong>local-weather</strong></span> example demonstrates the flexibility of
 
138
    <span class="application"><strong>pam_motd</strong></span>.
 
139
    </p>
 
140
            </div>
 
141
            <div xmlns="http://www.w3.org/1999/xhtml" class="navfooter">
 
142
              <hr />
 
143
              <table width="100%" summary="Navigation footer">
 
144
                <tr>
 
145
                  <td width="40%" align="left"><a accesskey="p" href="other-useful-applications.html"><img src="../../libs/navig/prev.png" alt="Indietro" /></a> </td>
 
146
                  <td width="20%" align="center">
 
147
                    <a accesskey="u" href="other-useful-applications.html">
 
148
                      <img src="../../libs/navig/up.png" alt="Risali" />
 
149
                    </a>
 
150
                  </td>
 
151
                  <td width="40%" align="right"> <a accesskey="n" href="etckeeper.html"><img src="../../libs/navig/next.png" alt="Avanti" /></a></td>
 
152
                </tr>
 
153
                <tr>
 
154
                  <td width="40%" align="left" valign="top">Capitolo 22. Altre utili applicazioni </td>
 
155
                  <td width="20%" align="center">
 
156
                    <a accesskey="h" href="index.html">
 
157
                      <img src="../../libs/navig/home.png" alt="Partenza" />
 
158
                    </a>
 
159
                  </td>
 
160
                  <td width="40%" align="right" valign="top"> etckeeper</td>
 
161
                </tr>
 
162
              </table>
 
163
            </div>
 
164
          </div>
 
165
        </div>
 
166
        <div id="page-border-bottom-repeat">
 
167
          <div id="footer">
 
168
            <div id="copyright">
 
169
                                                Ubuntu e Canonical sono marchi registrati da Canonical Ltd.
 
170
                                        </div>
 
171
          </div>
 
172
        </div>
 
173
        <div id="page-border-right-top"></div>
 
174
        <div id="page-border-right-bottom"></div>
 
175
      </div>
 
176
      <div id="page-border-left-top"></div>
 
177
      <div id="page-border-left-bottom"></div>
 
178
    </div>
 
179
    <p></p>
 
180
  </body>
 
181
</html>