wtmp - btmp

Post Reply
Message
Author
User avatar
ChrisUK
Qualified MX Guide
Posts: 299
Joined: Tue Dec 12, 2017 1:04 pm

wtmp - btmp

#1 Post by ChrisUK »

Occasionally, I use the last command to check various past events (logins,boots,etc.) - I don't use it often, but I've a curious nature, so I like to use it now and again. I tried using it the other day, and discovered that none of the wtmp, btmp files are in /var/log. I know they're not strictly necessary if not running a server, but I was wondering why MX doesn't create them as part of the initial installation as some other Distros do (Manjaro and CentOS spring to mind).

(Not important... can create manually... I'm just curious ;) )
Chris

MX 18 MX 19 - Manjaro

User avatar
fehlix
Developer
Posts: 10303
Joined: Wed Apr 11, 2018 5:09 pm

Re: wtmp - btmp

#2 Post by fehlix »

OK, let's summary, so others understand what we are talking about:
If a user wants to use "last" command to show a listing of last logged in users
he would need to enable logging by creating the logfiles manually like

Code: Select all

touch /var/log/btmp
touch /var/log/wtmp
I don't see a need to default enabling last command usage in MX as it is probably
mostly used as a single user system anyway.
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
ChrisUK
Qualified MX Guide
Posts: 299
Joined: Tue Dec 12, 2017 1:04 pm

Re: wtmp - btmp

#3 Post by ChrisUK »

fehlix wrote: Sat Jul 21, 2018 11:46 am OK, let's summary, so others understand what we are talking about:
If a user wants to use "last" command to show a listing of last logged in users
he would need to enable logging by creating the logfiles manually like

Code: Select all

touch /var/log/btmp
touch /var/log/wtmp
I don't see a need to default enabling last command usage in MX as it is probably
mostly used as a single user system anyway.
:puppy:
Thanks for replying... I don't disagree, I was just curious ;)

Although thinking again, I guess it can't hurt in these days of Spectre/Meltdown, as we have some mitigations, but never fixes. So maybe users would want to check past and present logins? Or would it be pretty pointless?
Chris

MX 18 MX 19 - Manjaro

p12funk
Posts: 5
Joined: Sat Aug 11, 2018 7:44 pm

Re: wtmp - btmp

#4 Post by p12funk »

I recently installed MX Linux and after a few days also noticed that last and lastb did not work as the log files were not there. I have posted this question on another forum and to date have not received an answer to the question: Does the MX Linux installation come with the last and lastb commands inoperative?

I understand how to enable it. My fear was that it had somehow been removed.

If Chris is one of the developers of MX Linux, I think the question has been answered.

Thanks

p12funk
Posts: 5
Joined: Sat Aug 11, 2018 7:44 pm

Re: wtmp - btmp

#5 Post by p12funk »

Sorry Chris, I meant Fehlix.

p12funk
Posts: 5
Joined: Sat Aug 11, 2018 7:44 pm

Re: wtmp - btmp

#6 Post by p12funk »

I would consider last and lastb important commands for anyone on a pc whether it is single or multi user. If an evil maid type person tried to log in on my system, being able to see what may have been many unsuccessful log-in attempts would be quite valuable. Also unsuccessful ssh login attempts would be important to see. This seems like basic security. Am I missing something? Every linux system I have ever run since the mid 1990s have had last and lastb included in the system. Apparently my edition MX-18.3_x64 Continuum does not!

My question is: Do the latest editions of MX include last and lastb?

User avatar
figueroa
Posts: 1049
Joined: Fri Dec 21, 2018 12:20 am

Re: wtmp - btmp

#7 Post by figueroa »

p12funk wrote: Thu Jan 30, 2020 7:23 pm I would consider last and lastb important commands for anyone on a pc whether it is single or multi user. ...

My question is: Do the latest editions of MX include last and lastb?
I agree with you and yes, last and lastb is included in MX-19. I think the logging should be activated by default in any Linux system. I'm a user and glad to have found this thread. I was about to post the question myself.
Andy Figueroa
Using Unix from 1984; GNU/Linux from 1993

Post Reply

Return to “General”