You are not logged in.
Pages: 1
Hello,
I´m having some problems importing new users...
I go to the "import new users"... sucessufully import the users but they do not appear on the User list...
the users exist in glpi_users...
Set GLPI in debug mode ( when listing users ) i noticed this query :
"SELECT count(DISTINCT glpi_users.ID)
FROM glpi_users
LEFT JOIN glpi_users_profiles ON (glpi_users.ID = glpi_users_profiles.FK_users)
WHERE ( glpi_users_profiles.FK_entities IN (0) ) AND glpi_users.deleted='0'"
this list the users i think... ( the imported users still do not appear...)
I change the query (on Mysql Query Browser ) to this :
" SELECT count(DISTINCT glpi_users.ID) FROM glpi_users
LEFT JOIN glpi_users_profiles ON (glpi_users.ID = glpi_users_profiles.FK_users)
WHERE glpi_users.deleted='0' "
well the problem i think is that when importing an user the user is not beeing assinged to a profile...
Can any one help ?
Thanks,
Duarte
Offline
hello,
when you import a user, it goes throught the rulesengine, in order to try to determine entity and profile associated with him.
if the user matches no rules, then it's imported without a profile, and is only visible in the root entity
Offline
OK...
got an error when importing a new user in debug mode:
PHP ERROR: ldap_search()[function.ldap-search]: bad search filter in e:\www.glpi\user.class.php at line 638
PHP ERROR_ ldap_get_entries(): supplied arguimento is not a valid ldap result resource in e:\www.glpi\user.class.php at line 641
what can be the problem ?
Offline
what's your connection filter in the LDAP configuration ?
Offline
LDAP
Filter: (objectClass=user)
Offline
1/ try this filter : (&(objectClass=user)(objectCategory=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
2/ can you post you complete ldap configuration please ?
Offline
tried the filter... got the same error...
the problem is here...
user.class.php
....
$sql_default_profile = "SELECT ID FROM glpi_profiles WHERE is_default=1";
....
this field does not exists on this table... maybe in an earlier version... ?
Offline
I think the problem is with the Entity and rights assignment rules
When i test the root this is the result :
Criteria
uid:
(AD)User ID:
Login IMAP/POP:
Result details
Root Yes
Rule result
Validation : No
------------
the problem is that if there is no action on a rule ( for example.. the only one "root", by default...) them there is a query hardcoded (SELECT ID FROM glpi_profiles WHERE is_default=1), but that table on version 0.71.2, does not have the field "is_default", so que query is malformed...
i whish that this code is reviwed in the new version.
Offline
There must be a "is_default" column in glpi_profiles table;
If not, you probably encounter a migration issue.
++
P.S. this field was add in GLPI 0.68.
Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/
Offline
ok u are right.. i was worng on the table name( the field is present)... them why an user does not appear on the user list(root entity(show all)) when imported. ?
if the Entity and rights assignment rules default rule root, is not set to any action the user does not appear.
Thanks.
Offline
Pages: 1