monitor who logged into Magea7 and who mounts what

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

monitor who logged into Magea7 and who mounts what

Postby vmunich » Sep 23rd, '19, 15:03

Hi everyone,

on my system with Mageia7, I would like to have the possibility to monitor who logged into the system and who mounted which data system or external drive or DVD in the last 7 days.

Is that possible ?

Which log file should i look into ?

Best,
Vincent
Vincent
--
Mandrake since 1998, then Mandriva, then Mageia....
vmunich
 
Posts: 55
Joined: Jan 11th, '13, 12:35

Re: monitor who logged into Magea7 and who mounts what

Postby doktor5000 » Sep 23rd, '19, 23:39

Who logged into the system is referring to local logins? You should be able to query this with the command last, although depending on what login manager you're using, it might not show all sessions ( see the third bullet point at https://wiki.mageia.org/en/Mageia_6_Errata#SDDM and the linked bug report )

FWIW this is logged in /var/log/wtmp and you can check the man page of wtmp for more details.

For who mounted what best look at journal
Code: Select all
journalctl -a --since="7 days ago" |grep -iE "mount|udisks"
log output which should show all mounts, although you might need to extend the grep regex depending on how the mounts happened.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18053
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron