Skip to main content
The 2024 Developer Survey results are live! See the results
Swapped the path to the logs to reflect the systems properly.
Source Link

On Debian-based operating systems, doing tail /var/log/auth.log | grep username should give you a user's sudo history. I don't believe there is a way to get a unified command history of a user's normal + sudo commands.

On RHEL-based operating systems, you would need to check /var/log/auth.logsecure instead of /var/log/secureauth.log.

On Debian-based operating systems, doing tail /var/log/auth.log | grep username should give you a user's sudo history. I don't believe there is a way to get a unified command history of a user's normal + sudo commands.

On RHEL-based operating systems, you would need to check /var/log/auth.log instead of /var/log/secure.

On Debian-based operating systems, doing tail /var/log/auth.log | grep username should give you a user's sudo history. I don't believe there is a way to get a unified command history of a user's normal + sudo commands.

On RHEL-based operating systems, you would need to check /var/log/secure instead of /var/log/auth.log.

Corrected log paths by distro
Source Link
Deltik
  • 19.7k
  • 17
  • 76
  • 117

DoingOn Debian-based operating systems, doing tail /var/log/auth.log | grep username should give you a user's sudo history. I don't believe there is a way to get a unified command history of a user's normal + sudo commands.

On someRHEL-based operating systems, you maywould need to replacecheck /var/log/auth.log withinstead of /var/log/secure.

Doing tail /var/log/auth.log | grep username should give you a user's sudo history. I don't believe there is a way to get a unified command history of a user's normal + sudo commands.

On some systems you may need to replace /var/log/auth.log with /var/log/secure

On Debian-based operating systems, doing tail /var/log/auth.log | grep username should give you a user's sudo history. I don't believe there is a way to get a unified command history of a user's normal + sudo commands.

On RHEL-based operating systems, you would need to check /var/log/auth.log instead of /var/log/secure.

Doing tail /var/log/auth.log | grep username should give you a user's sudo history. I don't believe there is a way to get a unified command history of a user's normal + sudo commands.

On some systems you may need to replace /var/log/auth.log with /var/log/secure

Doing tail /var/log/auth.log | grep username should give you a user's sudo history. I don't believe there is a way to get a unified command history of a user's normal + sudo commands.

Doing tail /var/log/auth.log | grep username should give you a user's sudo history. I don't believe there is a way to get a unified command history of a user's normal + sudo commands.

On some systems you may need to replace /var/log/auth.log with /var/log/secure

Post Migrated Here from stackoverflow.com (revisions)
Source Link
Kerin
Kerin
Loading