2 # @
(#
) Test logins using pam_winbind.so module using telnet
6 load_lib nsswitch
-config.exp
9 # @
(#
) Test user can login
12 spawn telnet localhost
14 set test_desc
"telnet localhost (login)"
18 timeout
{ fail
"timed out in $test_desc"; return }
19 eof
{ fail
"end of file in $test_desc"; return }
22 send
"$domain/$USER\r"
24 set test_desc
"telnet localhost (password)"
28 timeout
{ fail
"timed out in $test_desc"; return }
29 eof
{ fail
"end of file in $test_desc"; return }
36 "Login incorrect" { fail "login incorrect"; return }
37 timeout
{ fail
"timed out in $test_desc"; return }
38 eof
{ fail
"end of file in $test_desc"; return }
41 pass
"login $domain/$USER"
44 # @
(#
) Check supplementary group membership
47 set test_desc
"supplementary groups"
54 -re
"((\[0-9]+ )*\[0-9]+\r)" { exp_continue; }
56 timeout
{ fail
"timed out in $test_desc"; return }
57 eof
{ fail
"end of file in $test_desc"; return }
60 set groups $expect_out
(1,string
)
61 set wb_groups
[util_start
"bin/wbinfo" "-r $domain/$USER"]
63 verbose
"id groups are $groups"
64 verbose
"wbinfo groups are $wb_groups"
66 # Check all groups from id are in wbinfo and vice
-versa
70 foreach
{ group
} $groups
{
72 foreach
{ wb_group
} $wb_groups
{
73 if { $wb_group
== $group
} {
80 fail
"group $group not in output of wbinfo -r"
85 foreach
{ wb_group
} $wb_groups
{
87 foreach
{ group
} $groups
{
88 if { $group
== $wb_group
} {
95 fail
"group $group not in output of id -G"
101 pass
"id/wbinfo groups match"