Canedje
Posts: 265
Joined: Thu Mar 26, 2015 7:18 am

Overview of users login in the past

Fri Dec 04, 2015 1:21 pm

hello everybody.

Is there a method to show a list of users logged in at the RPI in the past including date and time?

I like to know this because my crontab commands where suddenly emptied without an explanation???
The header was stil there, the commands where gone.

Thanks for the answers

User avatar
rpdom
Posts: 17730
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Overview of users login in the past

Fri Dec 04, 2015 1:36 pm

You could try the "last" command which will show you all the logins since the log file was last cleared. The usual man page will show you the available options.

Canedje
Posts: 265
Joined: Thu Mar 26, 2015 7:18 am

Re: Overview of users login in the past

Fri Dec 04, 2015 1:52 pm

rpdom wrote:You could try the "last" command which will show you all the logins since the log file was last cleared. The usual man page will show you the available options.
Thanks for the answer.
After using last command I only see:

Code: Select all

wtmp begins Thu Jan  1 01:00:03 1970
It looks like this list is empty.
Do I need tot turn it on somhow before?

If I look to /var/log directory I do see:

Code: Select all

lrwxrwxrwx 1 root  root        9 dec  4 11:58 wtmp -> /dev/null
It looks like the wtmp file is ported to the /dev/null

User avatar
DougieLawson
Posts: 40228
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Overview of users login in the past

Sat Dec 05, 2015 8:22 am

What OS/distro are you running, because wtmp works on my Wheezy system that got upgraded to Jessie.
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Canedje
Posts: 265
Joined: Thu Mar 26, 2015 7:18 am

Re: Overview of users login in the past

Sat Dec 05, 2015 8:42 am

I'm using NOOBS

fruitoftheloom
Posts: 24553
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Overview of users login in the past

Sat Dec 05, 2015 9:01 am

Canedje wrote:I'm using NOOBS
Noobs is not an Operating System it is an installer / chooser :?
Thinking outside the box is better than burying your head in the sand...

Canedje
Posts: 265
Joined: Thu Mar 26, 2015 7:18 am

Re: Overview of users login in the past

Sat Dec 05, 2015 1:42 pm

fruitoftheloom wrote:
Canedje wrote:I'm using NOOBS
Noobs is not an Operating System it is an installer / chooser :?
This is the link I ever used in the far past:

https://www.raspberrypi.org/downloads/noobs/

So it looks like it is Raspbian

Return to “Advanced users”