class Inspec::Resources::Users
end
it { should exist }
describe users.where { uid =~ /S-1-5-21-d+-d+-d+-500/ } do
end
its(‘gids’) { should eq [1234] }
its(‘uids’) { should eq [1234] }
it { should eq [‘root’] }
describe users.where(uid: 0).entries do
This resource allows complex filter mechanisms
functionality
a feature request at github.com/chef/inspec if you need that
users managed on other systems like LDAP/ActiveDirectory. Please open
on Linux to parse all usernames. Therefore the resource may not return
TODO: the current version of the users resource will use eg. /etc/passwd
The InSpec users resources looksup all local users available on a system.
def collect_user_details
def collect_user_details @users_cache ||= @user_provider.collect_user_details unless @user_provider.nil? end
def initialize
def initialize # select user provider @user_provider = select_user_manager(inspec.os) return skip_resource 'The `users` resource is not supported on your OS yet.' if @user_provider.nil? end
def list_users
def list_users @username_cache ||= @user_provider.list_users unless @user_provider.nil? end
def to_s
def to_s 'Users' end