Method: Inspec::Resources::AixUser#credentials
- Defined in:
- lib/resources/users.rb
#credentials(username) ⇒ Object
472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
# File 'lib/resources/users.rb', line 472 def credentials(username) cmd = inspec.command( "lssec -c -f /etc/security/user -s #{username} -a minage -a maxage -a pwdwarntime", ) return nil if cmd.exit_status != 0 user_sec = cmd.stdout.chomp.split("\n").last.split(':') { mindays: user_sec[1].to_i * 7, maxdays: user_sec[2].to_i * 7, warndays: user_sec[3].to_i, } end |