Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have run linux mint for many years and recently decided to have a look at mx linux. I installed it a few weeks ago and within the last few days just noticed that I cannot run last or lastb. There is no wtmp or btmp file in /var/log I do not remember if I had ever run last on this os before. I don't know if the file existed and was removed or if it was never there. I have since touched both files and it seems to be logging.
My question is: Are wtmp and btmp installed as part of the mx linux system?
I have done quite a bit of searching and have been unable to find the answer.
I am still trying to find out if lastb is part of the MX Linux system. I have received info on how to correct it, but that is not my question. Why would lastb be removed from MX Linux? Are wtmp and btmp installed as part of the MX Linux system?
My question is: Are wtmp and btmp installed as part of the mx linux system?
Never ran MX myself, so cannot answer that, but in Slackware "wtmp" and "lastlog" are installed through the standard "etc" package (which doesn't do only etc files:
Quote:
System configuration files. The /etc directory is traditionally the location where configuration files are found.
but btmp is not, you have to create it yourself when you want bad login attempts logged.
PS: faillog, the other log file for failed attempts, is part of the shadow package.
On Ubuntu 18.04 (I doubt MX Linux is much different in this respect):
Code:
$ grep -A3 /var/log/ /var/lib/dpkg/info/base-files.postinst
if [ ! -f /var/log/wtmp ]; then
echo -n>/var/log/wtmp
fi
if [ ! -f /var/log/btmp ]; then
echo -n>/var/log/btmp
fi
if [ ! -f /var/log/lastlog ]; then
echo -n>/var/log/lastlog
fi
chown root:utmp /var/log/wtmp /var/log/btmp /var/log/lastlog
chmod 664 /var/log/wtmp /var/log/lastlog
chmod 660 /var/log/btmp
if [ ! -f /var/run/utmp ]; then
echo -n>/var/run/utmp
fi
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.