s4/drs(tort): TORTURE_DRS torture module - initial implementation
[Samba/fernandojvsilva.git] / testsuite / nsswitch / domusers.exp
blob3b291ab398b3a49d2d099fd93ad1f405b3444ea3
2 # @(#) Test that all users are members of the Domain Users group.
4 # Note that this isn't necessarily true all the time but you have to
5 # explicitly move people out of that group so it should be OK for te
8 load_lib util-defs.exp
9 load_lib $srcdir/lib/nsswitch-config.exp
11 # Get list of users and stick usernames in a hash
13 set user_list [util_start "getent" "passwd" ""]
15 foreach { user } [split $user_list "\n"] {
16 set user_elts [split $user ":"]
17 set users([lindex $user_elts 0]) 1
20 # Get list of groups
22 set group_list [util_start "getent" "group" ""]
24 foreach { group } [split $group_list "\n"] {
25 set group_elts [split $group ":"]
27 # Look for domain users group
29 if { ![regexp "Domain Users" [lindex $group_elts 0]] } {
30 continue
33 # Check each member of group was found in getent passwd
35 foreach { mem } [split [lindex $group_elts 3] ","] {
36 set mems($mem) 1