From f6cb88b6423d3582079de1abf6a878aff398c7b3 Mon Sep 17 00:00:00 2001 From: pingport80 Date: Wed, 21 Apr 2021 10:19:30 +0530 Subject: [PATCH] remove is_root check from linux_hashdump --- modules/post/linux/gather/hashdump.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/post/linux/gather/hashdump.rb b/modules/post/linux/gather/hashdump.rb index 09474ab0c4b8..8740e9b7b9db 100644 --- a/modules/post/linux/gather/hashdump.rb +++ b/modules/post/linux/gather/hashdump.rb @@ -22,8 +22,8 @@ def initialize(info = {}) # Run Method for when run command is issued def run - unless is_root? - fail_with Failure::NoAccess, 'You must run this module as root!' + unless readable?('/etc/shadow') + fail_with Failure::NoAccess, 'Shadow file must be readable in order to dump hashes' end passwd_file = read_file('/etc/passwd')