Class: Inspec::Resources::HpuxUser

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

Instance Attribute Summary

Attributes inherited from UnixUser

#id_cmd, #inspec

Attributes inherited from UserInfo

#inspec

Instance Method Summary collapse

Methods inherited from UnixUser

#identity, #initialize, #parse_id_entries, #parse_value

Methods inherited from UserInfo

#credentials, #initialize

Methods included from Converter

#convert_to_i

Constructor Details

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

Instance Method Details

#meta_info(username) ⇒ Object



336
337
338
339
340
341
342
343
344
# File 'lib/resources/user.rb', line 336

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