Into the (open) source


Terminal: delete the login information


After being absent from the blog for the whole month of August, and half of September back at breakneck speed with the usual weekly article. Today we talk about privacy.

The terminal Linux è fantastico, with just a few commands we can have full control over the computer. Vediamo ora nel dettaglio come delete the login information per il computer sul quale siamo loggati.

Mostrare le informazioni di login

Meanwhile, we must do the usual premise. The Linux system automatically records all logins to a binary file "/var/log/lastlog". To read it you have to use the program "lastlog" from the terminal with no arguments. Le informazioni che restituirà sono il nome dell'utente loggatosi, the porta in che data e a che ora.

Username         Port     From             Latest
root             tty1                      Thu Jan 25 15:23:50 +0530 2007
daemon ** Never logged in **
 27 22:10:36 +0530 2007
pdnsd ** Never logged in **
 27 19:55:22 +0530 2007

Clearly, if the user has never logged in, al posto delle informazioni di login verrà mostrato il messaggio "**Never logged in**".

Clear the login information

Basta semplicemente sovrascrivere the file "/var / log / lastlog", è necessario essere root (o un utente "sudo" con privilegi amministrativi) and make a copy before.

# cp / var / log / lastlog / root

Now we override the file:

# >/var / log / lastlog

Finished. Il file ora è vuoto.


I keep this blog as a hobby by 2009. I am passionate about graphic, technology, software Open Source. Among my articles will be easy to find music, and some personal thoughts, but I prefer the direct line of the blog mainly to technology. For more information contact me.