remove awk on lastb

This commit is contained in:
mhackethal 2019-09-12 16:06:03 +02:00 committed by GitHub
parent e48f672968
commit c08db992a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
{