:: Re: [DNG] new freedesktop "standard…
Página Principal
Delete this message
Reply to this message
Autor: Alessandro Selli
Data:  
Para: dng
Assunto: Re: [DNG] new freedesktop "standard": /etc/machine-id

Il 09/03/19 09:53, Didier Kryn ha scritto:
> Le 09/03/2019 à 00:28, Arnt Karlsen a écrit :
>> I might go: " * * * * * root \
>> fortune &&date |md5sum |cut -d" " -f-1 >/etc/machine-id |tee \
>>   >/dev/null 2>&1  " to keep this lightweight in my end and not
>> in the other end. :o)
>
>     Arnt, Could you be less cryptic please?
>
>     I found fortune in package 9base.



  The executable is in package fortune-mod, then there are separate
packages that install extensions to it's base sentences database.  In
Beowulf I can find:

fortunes

fortunes-bofh-excuses

fortunes-fr

fortunes-it

fortunes-it-off

fortunes-mario

fortunes-min

fortunes-off


> The idea of hashing a random aphorism is pleasant, but fortune always
> displays "Misfortune!" on every invocation, which probably means it
> misses a list of aphorisms not part of the package.



  Yes, you must install a sentences DB:

[alessandro@wkstn05 ~]$ fortune
What color is a chameleon on a mirror?
[alessandro@wkstn05 ~]$ fortune
Things are more like they used to be than they are now.
[alessandro@wkstn05 ~]$ fortune
O tempo é um excelente professor, mas ,infelizmente, mata todos os seus
alunos.
                -- Hector Berlioz
[alessandro@wkstn05 ~]$ fortune
Avevo un fortune l'altro giorno ma l'ho scordato...
[alessandro@wkstn05 ~]$


  However, fortune cookie's DB is a poor source of entropy and it
shouldn't be relied upon to generate secure passwords or encryption
keys.  It's allright to generate daily pseudo-random machine ids, though.


>  Also I don't understand what you mean by " * * * * * root "



  Man crontab(5) explaines them:

       Commands  are  executed  by cron(8) when the minute, hour, and
month of
       year fields match the current time, and when at least one  of 
the  two
       day  fields  (day of month, or day of week) match the current
time (see
       ``Note'' below).  cron(8) examines cron entries once every
minute.  The
       time and date fields are:

              field          allowed values
              -----          --------------
              minute         0-59
              hour           0-23
              day of month   1-31
              month          1-12 (or names, see below)
              day of week    0-7 (0 or 7 is Sun, or use names)

       A field may be an asterisk (*), which always stands for
``first-last''.


--
Alessandro Selli <alessandroselli@???>
VOIP SIP: dhatarattha@???
Chiave firma e cifratura PGP/GPG signing and encoding key:
BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE