3 # Display winbind-related options
5 require './samba-lib.pl';
9 &error_setup("<blink><font color=red>$text{'eacl_aviol'}</font></blink>");
10 &error("$text{'eacl_np'} $text{'eacl_pcm'}") unless $access{'conf_bind'};
12 &ui_print_header(undef, $text{'bind_title'}, "");
15 print "<form action=save_bind.cgi>\n";
16 print "<table border width=100%>\n";
17 print "<tr $tb> <td><b>$text{'bind_title'}</b></td> </tr>\n";
18 print "<tr $cb> <td><table width=100%>\n";
20 print "<tr> <td><b>$text{'bind_local'}</b></td>\n";
21 print "<td>",&ui_radio("local",
22 &istrue("winbind enable local accounts") ? 1 : 0,
23 [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
25 print "<td><b>$text{'bind_trust'}</b></td>\n";
26 print "<td>",&ui_radio("trust",
27 &istrue("winbind trusted domains only") ? 1 : 0,
28 [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
30 print "<tr> <td><b>$text{'bind_users'}</b></td>\n";
31 print "<td>",&ui_radio("users",
32 &istrue("winbind enum users") ? 1 : 0,
33 [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
35 print "<td><b>$text{'bind_groups'}</b></td>\n";
36 print "<td>",&ui_radio("groups",
37 &istrue("winbind enum groups") ? 1 : 0,
38 [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
40 print "<tr> <td><b>$text{'bind_defaultdomain'}</b></td>\n";
41 print "<td>",&ui_radio("defaultdomain",
42 &istrue("winbind use default domain") ? 1 : 0,
43 [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
45 print "<tr> <td><b>$text{'bind_realm'}</b></td>\n";
46 printf "<td><input name=realm size=20 value='%s'></td>\n",
49 print "<td><b>$text{'bind_cache'}</b></td>\n";
50 printf "<td><input name=cache size=5 value='%s'></td> </tr>\n",
51 &getval("winbind cache time");
53 print "<tr> <td><b>$text{'bind_uid'}</b></td>\n";
54 printf "<td><input name=uid size=20 value='%s'></td>\n",
57 print "<td><b>$text{'bind_gid'}</b></td>\n";
58 printf "<td><input name=gid size=20 value='%s'></td> </tr>\n",
61 $backend = &getval("idmap backend");
62 print "<tr> <td><b>$text{'bind_backend'}</b></td>\n";
63 print "<td colspan=3>",
64 &ui_radio("backend_def", $backend ? 0 : 1,
65 [ [ 1, $text{'default'} ],
66 [ 0, &ui_textbox("backend", $backend, 50) ] ]),
69 print "</table></tr></td></table><p>\n";
70 print "<input type=submit value=$text{'save'}></form>\n";
72 &ui_print_footer("", $text{'index_sharelist'});