From c08db992a9b691de91d99280ca60df6e36553133 Mon Sep 17 00:00:00 2001 From: mhackethal <31733219+mhackethal@users.noreply.github.com> Date: Thu, 12 Sep 2019 16:06:03 +0200 Subject: [PATCH] remove awk on lastb --- lib/inspec/resources/users.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/inspec/resources/users.rb b/lib/inspec/resources/users.rb index 9305889d1..ff19f6448 100644 --- a/lib/inspec/resources/users.rb +++ b/lib/inspec/resources/users.rb @@ -466,7 +466,7 @@ module Inspec::Resources cmd = inspec.command("echo $((($(date +%s) - $(date -d '#{params["Last password change"]}' '+%s'))/86400))") dayslastset = convert_to_i(cmd.stdout.chomp) if cmd.exit_status == 0 - cmd = inspec.command("lastb -w -a | awk '{print $1}' | grep #{username} | wc -l") + cmd = inspec.command("lastb -w -a | grep #{username} | wc -l") badpasswordattempts = convert_to_i(cmd.stdout.chomp) if cmd.exit_status == 0 {