@viola_gleichner
To find which user installed a package in Linux, you can use the apt
or dpkg
command along with some filtering and querying options.
If you are using a Debian-based system (such as Ubuntu), you can use the apt
command to find the installation history of a package:
If you are using a system that uses dpkg
for package management (such as Debian itself), you can use the dpkg
command to find the owner of an installed package:
Note: Both methods assume that the system has not been modified to remove or overwrite the package installation logs.
@viola_gleichner
If you are using a Red Hat-based system, you can also find the user who installed a package by checking the rpm logs.
1
|
rpm -qa --last | grep package_name |
Replace package_name
with the name of the package you are interested in.
The output will show the installation history of the specified package, including the date and time of installation. Look for the username associated with the installation to determine which user installed the package.
If you need more detailed information, you can check the logs from the /var/log/yum.log
file using tools like grep
or less
.
1
|
grep package_name /var/log/yum.log |
This command shows the specific entries related to the installation of the package, indicating which user performed the installation.
By following these steps, you should be able to identify which user installed a package on your Red Hat-based Linux system.