| by Scott Kilroy | No comments

How to monitor user activity in Linux with Acct

Acct is an open source application that we can use to monitor user activity in Linux. This tool comes with the functionality of running in the background and tracking user activity. It also reports what are the system resources are being consumed by the users. In this guide, we will see how to install and use this tool.

Step 01 : Installation

You can install it with the following command

#sudo apt install acct

Step 02 : Starting the service to monitor user activity

After installation, you can start the service to run in the background by running the following command

#/etc/init.d/acct start

Step 03 : check the status

You can check the status of the service and verify the monitoring is active in the background

#/etc/init.d/acct status

Step 04 : Display Individual User Time

To get the total login statistics time of a particular user in hours, use the following command

#ac <username>

Step 04 : Display the total login time of each user

The following command will display the total login time of each user in hours.

#ac -p

Step 05 : Display Day-Wise Login Time of User

If you need to check the day-wise total login time of a particular user in hours, run the following command.

#ac -d <username>

Step 06 : Display Statistics of Users Day-wise

This command will display the total login time in hours by day-wise.

#ac -d

Step 07 : Print All Account Activity Information

If you need to check what are the commands that each user has executed after login, use the following command

#sudo sa

In conclusion, ACCT is a great utility that system administors can use to check the user activity on linux systems. And also when looking from a security perspective, this tool will help to hold users accountable for the work they have done.

The post How to monitor user activity in Linux with Acct appeared first on The Linux Juggernaut.

Share Button

Source: The Linux Juggernaut

Leave a Reply