Method: Inspec::Resources::AixUser#credentials
- Defined in:
- lib/resources/user.rb
#credentials(username) ⇒ Object
319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
# File 'lib/resources/user.rb', line 319 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 |