Class: Inspec::Resources::HpuxUser

Inherits:
UnixUser show all
Defined in:
lib/inspec/resources/users.rb

Instance Attribute Summary

Attributes inherited from UnixUser

#id_cmd, #inspec, #list_users_cmd

Attributes inherited from UserInfo

#inspec

Instance Method Summary collapse

Methods inherited from UnixUser

#identity, #initialize, #list_users, #parse_id_entries, #parse_value

Methods inherited from UserInfo

#collect_user_details, #credentials, #identity, #initialize, #list_users, #user_details

Methods included from Converter

#convert_to_i, to_boolean

Constructor Details

This class inherits a constructor from Inspec::Resources::UnixUser

Instance Method Details

#meta_info(username) ⇒ Object



625
626
627
628
629
630
631
632
633
634
# File 'lib/inspec/resources/users.rb', line 625

def meta_info(username)
  hpuxuser = inspec.command("logins -x -l #{username}")
  return nil if hpuxuser.exit_status != 0

  user = hpuxuser.stdout.chomp.split(" ")
  {
    home: user[4],
    shell: user[5],
  }
end