
Friday, 26 June 2009
Ext4 file system how to, tips and tricks

Sunday, 21 June 2009
A GPG primer - Part II - Encrypting files
In part I I showed you how to configure your Solaris box to run GPG. Now, it's time to use it!
GPG lets you encrypt a file so that only the owner of the key the file was encrypted with can decrypt the message. I warn you once more: as you see, storing your key in a secure place is extremely important. If you think your key might have been compromised, revoke it and create another one.
In both cases the encrypted file would be named filename.gpg. If you prefer specifying the output file name, --output is your friend:
Decrypting a file
Now you've stored or received a file encrypted with your key. To decrypt it is just as easy:
GPG lets you encrypt a file so that only the owner of the key the file was encrypted with can decrypt the message. I warn you once more: as you see, storing your key in a secure place is extremely important. If you think your key might have been compromised, revoke it and create another one.
Encrypting a file
Let's suppose you don't want anybody but you to be able to read a file. As you know, you could store your file in a safe place but safe is never good enough. There could be some use cases for which you'd better have your file encrypted. Imagine you're copying important files on a FAT32 USB drive: FAT32 filesystems has not been built with security in mind! If you encrypt the file(s) with your own key, only you will be able to decrypt them. To encrypt such files, the only command you need is (the two syntaxes are equivalent):$ gpg --encrypt --recipient 'your-id' filename
$ gpg -er 'your-id' filename
In both cases the encrypted file would be named filename.gpg. If you prefer specifying the output file name, --output is your friend:
$ gpg --er 'your-id' --output outfile filenameThe same applies if you're encrypting a file for a friend of yours: just use their key id or their recipient address.
Searching a key in a keyserver
Well, there might have times you don't have your friend's key and maybe is out there, stored in a key server. You can have GPG search the keyserver with just one command:$ gpg --search-keys 'recipient-id' --keyserver keyserver-addressThe keyserver option is optional, otherwise gpg will use its default keyserver.
Decrypting a file
Now you've stored or received a file encrypted with your key. To decrypt it is just as easy:
$ gpg --dr 'your-id' encrypted-fileYou'll be asked for your password and then the file will be piped to standard output. As in the case of file encryption, you can specify an output file with the --output option.
Holidays in Crete, part II: relaxing
We woke up late in the morning. Breakfast was scheduled from 08.00 to 10.30 and we hardly showed up at 11.00. Fortunately, there were other latecomers, even if we were the only ones coming from Spain! Spain is different is always a justification. At least, people laughs.
Buffet was pretty well international: not so many greek delicacies there but it was sufficient to satisfy my needs: tea, feta, honey, olives and croissants. As soon as we finished, we went out to smoke a cigarette and there it was, calm and just in front of us: the Aegean Sea.
We stayed in Crete just one week and the idea was spending the first two or three days visiting the island and then just: relax. We never honored the initial schedule, though. The deep blue sea was calling us and touching the car key was painful. Knossos, see you soon.
We dressed our bathing costumes and we went having a sunbath. The hotel was equipped with many swimming pools and we chose one that was built on a terrace just upon the sea shore. The view was very beautiful and the private beach was just below us: twenty steps as a maximum.
At 14.30 we went to the main pool, which has a bar just in the middle, and we had a couple of orange juices. We went to our room, had a shower and a nap!
The first day we really charged our batteries.
Buffet was pretty well international: not so many greek delicacies there but it was sufficient to satisfy my needs: tea, feta, honey, olives and croissants. As soon as we finished, we went out to smoke a cigarette and there it was, calm and just in front of us: the Aegean Sea.
We stayed in Crete just one week and the idea was spending the first two or three days visiting the island and then just: relax. We never honored the initial schedule, though. The deep blue sea was calling us and touching the car key was painful. Knossos, see you soon.
We dressed our bathing costumes and we went having a sunbath. The hotel was equipped with many swimming pools and we chose one that was built on a terrace just upon the sea shore. The view was very beautiful and the private beach was just below us: twenty steps as a maximum.
At 14.30 we went to the main pool, which has a bar just in the middle, and we had a couple of orange juices. We went to our room, had a shower and a nap!
The first day we really charged our batteries.
Il paese del non-finito e delle chiacchiere
Quando ero piccolo a Padova le scuole finivano sempre prima del Santo. Per me e mia sorella, però, non era la grande (e patavina) festa di piazza il giorno che attendevamo con ansia: all'inizio dell'estate, noi, partivamo.
Mio padre, che allora esercitava ancora la professione medica, ci portava tutti al mare un mese o più, in Sicilia. Il viaggio era lungo e lo facevamo in auto: partivamo prima dell'alba e percorrevamo tutto lo stivale. Ci fermavamo qualche giorno a casa di uno zio, in Puglia, e poi partivamo un'altra volta. Anche così, il viaggio mi sembrava lunghissimo ma, agli occhi di me bambino, era affascinante. Mia sorella era piccola e dormiva sul sedile posteriore eternamente sdraiata e con la testa appoggiata sul grembo di mia nonna. Io sedevo davanti, accanto a mio padre, e non chiudevo occhio nemmeno per un momento. Guardavo fuori, osservavo i campi, ammiravo i viadotti, contavo le linee di mezzeria che intersecavano la traiettoria della nostra auto, contavo le gallerie per cui passavamo e non la smettevo di calcolare quanti chilometri mancavano. Sarà per questo che ricordi così lontani nel tempo sono ancora così vivi nella mia memoria.
Allora, e sto parlando del 1980, il mondo era veramente diverso e sono fermamente convinto che la mia generazione sia stata quella che ha vissuto il cambio più grande: ci dettero alla luce in un mondo, e crescemmo in un altro. Telefonare, allora, voleva dire far girare una ruota di plastica in un apparecchio grigio saldamente ancorato alla parete del corridorio. Fuori di casa, e solo se ce n'era veramente bisogno, telefonare significava anzitutto cercare qualche gettone telefonico per poi entrare in una (fetida) gabina ed effettuare la chiamata. Credo che allora la chiamassimo interurbana a tempo. Le automobili avevano ancora i carburatori e l'aria condizionata era un optional raro. I climatizzatori di oggi, non me li sognavo nemmeno.
Esempi così ne potrei fare a migliaia e se mi avessero raccontato che nel futuro avrei avuto un iPhone o una qualsiasi delle inutilità così chic que abbiamo al giorno d'oggi, non c'avrei creduto, probabilmente.
Ci sono cose che però non cambiano. O che cambiano molto lentamente. Alcune sono buone ed altre lo sono un meno. L'unica cosa che anche il mio io bambino sapeva che non sarebbe cambiata mai sapete qual'è? La Salerno-Reggio Calabria.
Ricordo che quando arrivavamo lì, tutto diventava più brutto. Il mio vocabolario del tempo non poteva essere più elaborato. Semplicemente, brutto. E quando torno in Italia a volte mi dispiace perché sento questa sensazione decadente di dejá vu. Tutto è uguale. Troppo uguale. In Veneto, forse, noterò il nuovo passante di Mestre però temo che è finita lì.
Ed anche quando ti svegli ottimista, bevi il tuo caffè e leggi il giornale, il Corriere della Sera ti ricorda che momento d'inerzia ha il mio bel (?) paese.
Leggete qui...
Più passa il tempo, meno mi interessa, ormai. Non vivendo lì, credo che non potrei capire come e perché i miei connazionali possono (soprav)vivere in un clima di sonnacchiosa indifferenza. Io lavoro e pago le tasse in un altro paese ed ho la soddisfazione, rara per un italiano, di vedere come si spendono i soldi delle mie tasse. A volte bene, a volte meno bene, ovviamente. Però lo vedo. So che non sarà il mio pro-pro-pro-nipote chi vedrà una nuova autostrada, qui a Madrid: lo vedrò io. Arrivai qui tre anni fa ed ho potuto vedere la realizzazione di un'opera pubblica (parte della M30 di Madrid) che a Milano non potrei nemmeno immaginarmi.
Mi dispiace, però sempre meno.
Mio padre, che allora esercitava ancora la professione medica, ci portava tutti al mare un mese o più, in Sicilia. Il viaggio era lungo e lo facevamo in auto: partivamo prima dell'alba e percorrevamo tutto lo stivale. Ci fermavamo qualche giorno a casa di uno zio, in Puglia, e poi partivamo un'altra volta. Anche così, il viaggio mi sembrava lunghissimo ma, agli occhi di me bambino, era affascinante. Mia sorella era piccola e dormiva sul sedile posteriore eternamente sdraiata e con la testa appoggiata sul grembo di mia nonna. Io sedevo davanti, accanto a mio padre, e non chiudevo occhio nemmeno per un momento. Guardavo fuori, osservavo i campi, ammiravo i viadotti, contavo le linee di mezzeria che intersecavano la traiettoria della nostra auto, contavo le gallerie per cui passavamo e non la smettevo di calcolare quanti chilometri mancavano. Sarà per questo che ricordi così lontani nel tempo sono ancora così vivi nella mia memoria.
Allora, e sto parlando del 1980, il mondo era veramente diverso e sono fermamente convinto che la mia generazione sia stata quella che ha vissuto il cambio più grande: ci dettero alla luce in un mondo, e crescemmo in un altro. Telefonare, allora, voleva dire far girare una ruota di plastica in un apparecchio grigio saldamente ancorato alla parete del corridorio. Fuori di casa, e solo se ce n'era veramente bisogno, telefonare significava anzitutto cercare qualche gettone telefonico per poi entrare in una (fetida) gabina ed effettuare la chiamata. Credo che allora la chiamassimo interurbana a tempo. Le automobili avevano ancora i carburatori e l'aria condizionata era un optional raro. I climatizzatori di oggi, non me li sognavo nemmeno.
Esempi così ne potrei fare a migliaia e se mi avessero raccontato che nel futuro avrei avuto un iPhone o una qualsiasi delle inutilità così chic que abbiamo al giorno d'oggi, non c'avrei creduto, probabilmente.
Ci sono cose che però non cambiano. O che cambiano molto lentamente. Alcune sono buone ed altre lo sono un meno. L'unica cosa che anche il mio io bambino sapeva che non sarebbe cambiata mai sapete qual'è? La Salerno-Reggio Calabria.
Ricordo che quando arrivavamo lì, tutto diventava più brutto. Il mio vocabolario del tempo non poteva essere più elaborato. Semplicemente, brutto. E quando torno in Italia a volte mi dispiace perché sento questa sensazione decadente di dejá vu. Tutto è uguale. Troppo uguale. In Veneto, forse, noterò il nuovo passante di Mestre però temo che è finita lì.
Ed anche quando ti svegli ottimista, bevi il tuo caffè e leggi il giornale, il Corriere della Sera ti ricorda che momento d'inerzia ha il mio bel (?) paese.
Leggete qui...
Più passa il tempo, meno mi interessa, ormai. Non vivendo lì, credo che non potrei capire come e perché i miei connazionali possono (soprav)vivere in un clima di sonnacchiosa indifferenza. Io lavoro e pago le tasse in un altro paese ed ho la soddisfazione, rara per un italiano, di vedere come si spendono i soldi delle mie tasse. A volte bene, a volte meno bene, ovviamente. Però lo vedo. So che non sarà il mio pro-pro-pro-nipote chi vedrà una nuova autostrada, qui a Madrid: lo vedrò io. Arrivai qui tre anni fa ed ho potuto vedere la realizzazione di un'opera pubblica (parte della M30 di Madrid) che a Milano non potrei nemmeno immaginarmi.
Mi dispiace, però sempre meno.
Friday, 19 June 2009
Solaris Express Community Edition, build 116
This time it wasn't announced: Solaris Express Community Edition build 116 is available for download. Changelogs are here:
It seems there's no bug I'm hitting was fixed in build 116 (while yes, there's a bug I'm waiting build 117 for!). Nevertheless live upgrading is so easy that I'm not missing the opportunity of upgrading my system, as I already explained you in another post.
This time I've experienced a couple of glitches but nothing important: the result is perfectly functioning, as usual. I've hit some minor and inexplicable problems quickly solved:
Haven't you downloaded Solaris or OpenSolaris yet? Don't know what you're waiting for.
It seems there's no bug I'm hitting was fixed in build 116 (while yes, there's a bug I'm waiting build 117 for!). Nevertheless live upgrading is so easy that I'm not missing the opportunity of upgrading my system, as I already explained you in another post.
This time I've experienced a couple of glitches but nothing important: the result is perfectly functioning, as usual. I've hit some minor and inexplicable problems quickly solved:
- ludelete was failing to delete the old boot environment (snv_114) reporting it as currently mounted.
- As soon as I restarted the machine the ntp service went into maintenance mode.
- Nautilus crashed at first login.
Haven't you downloaded Solaris or OpenSolaris yet? Don't know what you're waiting for.
NTP goes into maintenance mode: /sbin/sh: /lib/svc/method/xntp: not found
After live upgrading to Solaris Express Community Edition build 116, at the first reboot, I noticed that the NTP service had gone into maintenance mode:
I checked and xntp isn't there. This is related to Solaris switching to NTP version 4: if you just live upgraded to build 116 don't worry. That's indeed a glitch during the first reboot and SMF should have updated the ntp service's manifest during the boot: you won't see that message anymore.
# svcs -xvand the log file clearly showed me the problem:
svc:/network/ntp:default (Network Time Protocol (NTP) Version 4)
State: maintenance since June 20, 2009 12:44:33 AM CEST
Reason: Start method failed repeatedly, last exited with status 1.
See: http://sun.com/msg/SMF-8000-KS
See: man -M /usr/share/man -s 1M ntpq
See: man -M /usr/share/man -s 1M ntpd
See: man -M /usr/share/man -s 4 ntp.conf
See: /var/svc/log/network-ntp:default.log
Impact: This service is not running.
# tail /var/svc/log/network-ntp\:default.log
[ Jun 20 00:44:32 Executing start method ("/lib/svc/method/xntp"). ]
/sbin/sh: /lib/svc/method/xntp: not found
[ Jun 20 00:44:33 Method "start" exited with status 1. ]
[ Jun 20 00:44:33 Executing start method ("/lib/svc/method/xntp"). ]
/sbin/sh: /lib/svc/method/xntp: not found
[ Jun 20 00:44:33 Method "start" exited with status 1. ]
[ Jun 20 00:44:33 Executing start method ("/lib/svc/method/xntp"). ]
/sbin/sh: /lib/svc/method/xntp: not found
[ Jun 20 00:44:33 Method "start" exited with status 1. ]
[ Jun 20 00:44:43 Rereading configuration. ]
I checked and xntp isn't there. This is related to Solaris switching to NTP version 4: if you just live upgraded to build 116 don't worry. That's indeed a glitch during the first reboot and SMF should have updated the ntp service's manifest during the boot: you won't see that message anymore.
Solaris upgrades NTP to version 4
As explained in the original announcement:
I also warned you about a problem I experienced with Solaris Express Community Edition build 116.
The integration ofSolaris is going to upgrade NTP to version 4. You probably would care if you're building the ON consolidation or if you're really interested in running NTP version 4.
PSARC/2009/244 Upgrade NTP to Version 4
4669914 Solaris should update to Version 4 of NTP
is a Flag Day for incremental builds.
I also warned you about a problem I experienced with Solaris Express Community Edition build 116.
Subscribe to:
Posts (Atom)