class Inspec::Resources::FreeBSDUser
FreeBSD recommends to use the 'pw' command for user management @see: www.freebsd.org/doc/handbook/users-synopsis.html @see: www.freebsd.org/cgi/man.cgi?pw(8) It offers the following commands:
-
adduser(8) The recommended command-line application for adding new users.
-
rmuser(8) The recommended command-line application for removing users.
-
chpass(1) A flexible tool for changing user database information.
-
passwd(1) The command-line tool to change user passwords.
Public Instance Methods
meta_info(username)
click to toggle source
# File lib/inspec/resources/users.rb, line 594 def meta_info(username) cmd = inspec.command("pw usershow #{username} -7") return nil if cmd.exit_status != 0 # returns: root:*:0:0:Charlie &:/root:/bin/csh passwd = parse_passwd_line(cmd.stdout.chomp) { home: passwd["home"], shell: passwd["shell"], } end