在ITOP导入AD帐号信息脚本
如题,请查收附档。下完后,把ZIP改成TXT怎么用呢? 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
(h r/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> jemball 发表于 2013-10-16 17:04 static/image/common/back.gif
Edit the configuration array at the beginning of the script to tailor it to your needs:
// Configur ...
你好
:Simulation mode -- no action will be performed
Set the parameter simulation=0 to trigger the actual execution.
Connected to 10.240.1.111 on port 389
Warning: ldap_bind(): Unable to bind to server: Invalid credentials in C:\xampp\htdocs\webservices\AD_import_accounts.php on line 450
Could not bind这是怎么回事?谢谢。 运行php -q /usr/local/apache2/htdocs/web/AD_import_accounts.php --auto_user=admin --auth_pwd=password
出现如下结果:
Access restricted or wrong credentials ('')