clear the login history?

johnny306

New Member
Joined
Jul 3, 2018
Messages
17
Reaction score
11
Credits
0
I am a new linux zorin user. How do I clear the login history in zorin? I have tried a lot of the suggestions on the internet but nothing has worked so far.

Thanks,
johnny306
 


If you mean browser history, in Chromium, press Ctrl+H. Then click "History" at the top. Then go for "Clear browsing data".
 
All I had to do was turn off usage and history in the privacy setting in zorin.

Nope, not all you have to do :)

(Wizard appears in a puff of smoke, bearing news on Zorin)

If you go to Terminal and type in

Code:
last

… you will likely get output similar to mine below (click the Spoiler button)


chris@zorin12dot4-WD:~$ last

chris pts/0 :1 Mon Oct 29 12:33 still logged in

chris pts/0 :1 Mon Oct 29 11:53 - 12:04 (00:10)

chris tty2 :1 Mon Oct 29 08:48 still logged in

reboot system boot 4.15.0-36-generi Mon Oct 29 08:47 still running

chris pts/1 :1 Mon Oct 29 08:38 - 08:46 (00:08)

chris pts/0 :1 Mon Oct 29 08:36 - 08:38 (00:02)

chris pts/0 :1 Mon Oct 29 08:32 - 08:33 (00:00)

chris tty2 :1 Mon Oct 29 08:24 - down (00:22)

reboot system boot 4.15.0-36-generi Mon Oct 29 08:23 - 08:46 (00:23)

chris pts/0 :1 Sun Oct 28 18:52 - 18:53 (00:00)

chris pts/0 :1 Sun Oct 28 18:43 - 18:50 (00:06)

chris tty2 :1 Sun Oct 28 18:38 - down (13:45)

reboot system boot 4.15.0-36-generi Sun Oct 28 18:37 - 08:23 (13:45)

chris pts/0 :1 Thu Oct 18 18:43 - 18:45 (00:01)

chris tty2 :1 Thu Oct 18 18:33 - down (12:44)

reboot system boot 4.15.0-36-generi Thu Oct 18 18:33 - 07:18 (12:45)

chris pts/0 :1 Wed Oct 17 12:51 - 12:54 (00:02)

chris pts/0 :1 Wed Oct 17 12:26 - 12:27 (00:00)

chris tty2 :1 Wed Oct 17 10:38 - crash (1+07:55)

reboot system boot 4.15.0-36-generi Wed Oct 17 10:37 - 07:18 (1+20:40)

chris pts/0 :1 Wed Oct 17 10:22 - 10:23 (00:01)

chris tty2 :1 Wed Oct 17 20:12 - down (-9:-35)

reboot system boot 4.15.0-36-generi Wed Oct 17 20:12 - 10:36 (-9:-35)

chris tty2 :1 Tue Oct 16 14:45 - down (00:11)

reboot system boot 4.15.0-34-generi Tue Oct 16 14:44 - 14:56 (00:12)

chris pts/0 :1 Tue Oct 16 14:32 - 14:32 (00:00)

chris tty2 :1 Tue Oct 16 14:23 - crash (00:21)

reboot system boot 4.15.0-34-generi Tue Oct 16 14:22 - 14:56 (00:34)



wtmp begins Tue Oct 16 14:21:55 2018

chris@zorin12dot4-WD:~$

This is despite the fact that I have changed my Privacy Settings as you have, and “cleared current”.

The use of lastb is confined to elevated privileges, so either (the lines starting with a # are Comments)

Code:
sudo lastb

# or

 sudo -i

# then

lastb

#or

sudo su

# then

lastb

Typically this will return you to the prompt with no output.

With my output above from “last”, results include both soft and hard boots/reboots, since changing my Privacy Settings yesterday.

I have provided a screenshot for the files generated, by going to /var/log/ in Nautilus, the FM (File Manager) for Zorin, having opened Nautilus using elevated privileges in order to access the files’ contents (owned by Root).

I then performed a search on “tmp” and the results are shown.

08udUoI.png


SCREENSHOT 1

The files named wtmp and wtmp.1 are binary (or other) files that are read by the command last.

The files named btmp and btmp.1 are text files (empty) read by the command lastb.

Right-clicking and choosing Properties gives you an idea on dates.

So if you wish to get rid of this history, your best option is to follow a procedure along the lines of that linked to by Arochester.

The article is written in early 2011 it would appear, from the comments. Nevertheless, its thrust is still accurate.

Implementing those echo commands, for me, provides the following:

chris@zorin12dot4-WD:~$ sudo su

[sudo] password for chris:

root@zorin12dot4-WD:/home/chris# echo >/var/log/wtmp

root@zorin12dot4-WD:/home/chris# echo >/var/log/btmp

root@zorin12dot4-WD:/home/chris# last


wtmp begins Mon Oct 29 13:47:18 2018

root@zorin12dot4-WD:/home/chris# lastb

btmp begins Mon Oct 29 13:47:34 2018

root@zorin12dot4-WD:/home/chris#

What happens following a reboot?

I have rebooted, not bothered with Root privileges, as I know lastb output will be nil.

chris@zorin12dot4-WD:~$ last

chris pts/0 :1 Mon Oct 29 13:54 still logged in

chris pts/0 :1 Mon Oct 29 13:54 - 13:54 (00:00)

chris tty2 :1 Mon Oct 29 13:53 still logged in

reboot system boot 4.15.0-36-generi Mon Oct 29 13:53 still running

wtmp begins Mon Oct 29 13:52:28 2018

chris@zorin12dot4-WD:~$


So no joy. My Zorin ignores the Privacy Settings change, and likely so does yours.


If you have different results, please share them with us. :)

One little nit-pick with the article linked to is that he refers to the btmp and wtmp as being folders/directories, they are not, they are files.

But that is not to say things were not structured differently back in 2011. My history with Linux goes back to 2010 but not to that level or depth of knowledge.

There must be another process at work here which could be addressed, but sadly I have not the time currently to pursue it further.


Cheers

Wizard
 
Nope, not all you have to do :)

(Wizard appears in a puff of smoke, bearing news on Zorin)

If you go to Terminal and type in

Code:
last

… you will likely get output similar to mine below (click the Spoiler button)


chris@zorin12dot4-WD:~$ last

chris pts/0 :1 Mon Oct 29 12:33 still logged in

chris pts/0 :1 Mon Oct 29 11:53 - 12:04 (00:10)

chris tty2 :1 Mon Oct 29 08:48 still logged in

reboot system boot 4.15.0-36-generi Mon Oct 29 08:47 still running

chris pts/1 :1 Mon Oct 29 08:38 - 08:46 (00:08)

chris pts/0 :1 Mon Oct 29 08:36 - 08:38 (00:02)

chris pts/0 :1 Mon Oct 29 08:32 - 08:33 (00:00)

chris tty2 :1 Mon Oct 29 08:24 - down (00:22)

reboot system boot 4.15.0-36-generi Mon Oct 29 08:23 - 08:46 (00:23)

chris pts/0 :1 Sun Oct 28 18:52 - 18:53 (00:00)

chris pts/0 :1 Sun Oct 28 18:43 - 18:50 (00:06)

chris tty2 :1 Sun Oct 28 18:38 - down (13:45)

reboot system boot 4.15.0-36-generi Sun Oct 28 18:37 - 08:23 (13:45)

chris pts/0 :1 Thu Oct 18 18:43 - 18:45 (00:01)

chris tty2 :1 Thu Oct 18 18:33 - down (12:44)

reboot system boot 4.15.0-36-generi Thu Oct 18 18:33 - 07:18 (12:45)

chris pts/0 :1 Wed Oct 17 12:51 - 12:54 (00:02)

chris pts/0 :1 Wed Oct 17 12:26 - 12:27 (00:00)

chris tty2 :1 Wed Oct 17 10:38 - crash (1+07:55)

reboot system boot 4.15.0-36-generi Wed Oct 17 10:37 - 07:18 (1+20:40)

chris pts/0 :1 Wed Oct 17 10:22 - 10:23 (00:01)

chris tty2 :1 Wed Oct 17 20:12 - down (-9:-35)

reboot system boot 4.15.0-36-generi Wed Oct 17 20:12 - 10:36 (-9:-35)

chris tty2 :1 Tue Oct 16 14:45 - down (00:11)

reboot system boot 4.15.0-34-generi Tue Oct 16 14:44 - 14:56 (00:12)

chris pts/0 :1 Tue Oct 16 14:32 - 14:32 (00:00)

chris tty2 :1 Tue Oct 16 14:23 - crash (00:21)

reboot system boot 4.15.0-34-generi Tue Oct 16 14:22 - 14:56 (00:34)



wtmp begins Tue Oct 16 14:21:55 2018

chris@zorin12dot4-WD:~$

This is despite the fact that I have changed my Privacy Settings as you have, and “cleared current”.

The use of lastb is confined to elevated privileges, so either (the lines starting with a # are Comments)

Code:
sudo lastb

# or

 sudo -i

# then

lastb

#or

sudo su

# then

lastb

Typically this will return you to the prompt with no output.

With my output above from “last”, results include both soft and hard boots/reboots, since changing my Privacy Settings yesterday.

I have provided a screenshot for the files generated, by going to /var/log/ in Nautilus, the FM (File Manager) for Zorin, having opened Nautilus using elevated privileges in order to access the files’ contents (owned by Root).

I then performed a search on “tmp” and the results are shown.

08udUoI.png


SCREENSHOT 1

The files named wtmp and wtmp.1 are binary (or other) files that are read by the command last.

The files named btmp and btmp.1 are text files (empty) read by the command lastb.

Right-clicking and choosing Properties gives you an idea on dates.

So if you wish to get rid of this history, your best option is to follow a procedure along the lines of that linked to by Arochester.

The article is written in early 2011 it would appear, from the comments. Nevertheless, its thrust is still accurate.

Implementing those echo commands, for me, provides the following:

chris@zorin12dot4-WD:~$ sudo su

[sudo] password for chris:

root@zorin12dot4-WD:/home/chris# echo >/var/log/wtmp

root@zorin12dot4-WD:/home/chris# echo >/var/log/btmp

root@zorin12dot4-WD:/home/chris# last


wtmp begins Mon Oct 29 13:47:18 2018

root@zorin12dot4-WD:/home/chris# lastb

btmp begins Mon Oct 29 13:47:34 2018

root@zorin12dot4-WD:/home/chris#

What happens following a reboot?

I have rebooted, not bothered with Root privileges, as I know lastb output will be nil.

chris@zorin12dot4-WD:~$ last

chris pts/0 :1 Mon Oct 29 13:54 still logged in

chris pts/0 :1 Mon Oct 29 13:54 - 13:54 (00:00)

chris tty2 :1 Mon Oct 29 13:53 still logged in

reboot system boot 4.15.0-36-generi Mon Oct 29 13:53 still running

wtmp begins Mon Oct 29 13:52:28 2018

chris@zorin12dot4-WD:~$


So no joy. My Zorin ignores the Privacy Settings change, and likely so does yours.


If you have different results, please share them with us. :)

One little nit-pick with the article linked to is that he refers to the btmp and wtmp as being folders/directories, they are not, they are files.

But that is not to say things were not structured differently back in 2011. My history with Linux goes back to 2010 but not to that level or depth of knowledge.

There must be another process at work here which could be addressed, but sadly I have not the time currently to pursue it further.


Cheers

Wizard
Wizard, thanks for the information. Your information was very helpful, and it did work for me. Thanks again for taking the time to help.

johnny306
 

Members online


Top