mirror of
https://github.com/inspec/inspec
synced 2024-12-20 18:13:20 +00:00
e8ae9012ea
Signed-off-by: Miah Johnson <miah@chia-pet.org>
69 lines
1.5 KiB
Ruby
69 lines
1.5 KiB
Ruby
# test root group on linux
|
|
if os.linux?
|
|
describe group('root') do
|
|
it { should exist }
|
|
its('gid') { should eq 0 }
|
|
end
|
|
|
|
describe group('noroot') do
|
|
it { should_not exist }
|
|
its('gid') { should eq nil }
|
|
end
|
|
elsif os[:family] == 'freebsd'
|
|
describe group('wheel') do
|
|
it { should exist }
|
|
its('gid') { should eq 0 }
|
|
end
|
|
|
|
describe group('root') do
|
|
it { should_not exist }
|
|
its('gid') { should eq nil }
|
|
end
|
|
|
|
describe group('noroot') do
|
|
it { should_not exist }
|
|
its('gid') { should eq nil }
|
|
end
|
|
elsif os[:family] == 'aix'
|
|
describe group('system') do
|
|
it { should exist }
|
|
its('gid') { should eq 0 }
|
|
end
|
|
|
|
describe group('bin') do
|
|
it { should exist }
|
|
its('gid') { should eq 2 }
|
|
end
|
|
|
|
describe group('noroot') do
|
|
it { should_not exist }
|
|
its('gid') { should eq nil }
|
|
end
|
|
elsif os.solaris?
|
|
describe group('root') do
|
|
it { should exist }
|
|
its('gid') { should eq 0 }
|
|
end
|
|
|
|
describe group('bin') do
|
|
it { should exist }
|
|
its('gid') { should eq 2 }
|
|
end
|
|
|
|
describe group('noroot') do
|
|
it { should_not exist }
|
|
its('gid') { should eq nil }
|
|
end
|
|
elsif os[:family] == 'windows'
|
|
describe group('Administrators') do
|
|
it { should exist }
|
|
its('gid') { should eq 'S-1-5-32-544' }
|
|
its('members') { should include 'Administrator' }
|
|
end
|
|
|
|
describe group('Power Users') do
|
|
it { should exist }
|
|
its('gid') { should eq 'S-1-5-32-547' }
|
|
its('members') { should eq [] }
|
|
end
|
|
end
|