diff --git a/lam/lib/listhosts.php b/lam/lib/listhosts.php new file mode 100644 index 00000000..3414c514 --- /dev/null +++ b/lam/lib/listhosts.php @@ -0,0 +1,53 @@ +"; + +// Samba hosts have the attribute "sambaAccount" and end with "$" +$filter = "(&(objectClass=sambaAccount) (uid=*$))"; +$attrs = array("cn", "rid"); +$sr = ldap_search($_SESSION["ldap"]->server(), + $_SESSION["config"]->get_HostSuffix(), + $filter, $attrs); +$info = ldap_get_entries($_SESSION["ldap"]->server, $sr); +ldap_free_result($sr); + +// print host table +echo "
" . _("Host Name") . " | "; +echo "RID | "; +echo "
---|---|
" . $info["cn"][$i] . " | "); + echo ("" . $info["rid"][$i] . " | "); + echo("
- | echo _("Groups") ?> |
- echo _("Samba Hosts") ?> |
+ + |