按照IT运维管理社区里面前面留下的方法试了试,都不成功啊,不知道是哪里有问题还是少了什么步骤,请帮忙看看
1. 这个脚本做完了,\xampp\htdocs\webservices\AD_import_accounts.php
但是网页运行和脚本运行,都是print出了配置,没有导入账户信息
Edit the configuration array at the beginning of the script to tailor it to your needs:
// Configuration of the Active Directory connection
'host' => 'localhost', // IP or FQDN of your domain controller
'port' => '389', // LDAP port, 398=LDAP, 636= LDAPS
'dn' => 'DC=combodo,DC=net', // Domain DN
'username' => 'ad_user', // username with read access
'password' => 'ad_password', // password for above
// Query to retrieve and filter the users from AD
// Example: retrieve all users from the AD Group "iTop Users"
'ldap_query' => '(&(objectCategory=user)(memberOf=CN=iTop Users,CN=Users,DC=combodo,DC=net))',
// Example 2: retrieves ALL the users from AD
// 'ldap_query' => '(&(objectCategory=user))', // Retrieve all users
// Which field to use as the iTop login samaccountname or userprincipalname ?
'login' => 'samaccountname',
//'login' => 'userprincipalname',
running the script
The script can be run only by an iTop administrator.
When your configuration is done, run the script either by pointing your web browser to it
(htp://your_itop_server/webservices/AD_import_accounts.php) or by using the following
command line:
php.exe -q AD_import_accounts.php --auth_user=<iTop_admin_user> --auth_pwd=<iTop_admin_pwd> |
2. 下面这个文档修改后,用AD的账户登录不成功啊。
通过配置文件C:\xampp\htdocs\conf\production\config-itop.php,启用LDAP进行密码验证,
$MyModuleSettings = array(
'authent-ldap' => array (
'host' => 'X.X.X.X',
'port' => 389,
'default_user' => 'XXXX',
'default_pwd' => '*****',
'base_dn' => 'ou=Management,ou=Domain Users,dc=XXX,dc=com',
'user_query' => '(&(uid=%1$s)(inetuserstatus=ACTIVE))',
'options' => array (
17 => 3,
8 => 0,
),
),
|