[xwiki-users] Snipplet Import users from LDAP failed
I trying to use snipplet "Import users from LDAP" from code zone (http://code.xwiki.org/xwiki/bin/view/Snippets/ImportUsersFromLDAPSnippet), but it failed with error: Error number 4002 in 4: Error while parsing groovy page Sandbox.TestPage8 Wrapped Exception: startup failed: Script1.groovy: 20: unexpected token: wikicreatelink @ line 20, column 45. + res.get("cn") + " Line 20 is: print ("" + res.get("cn") + " <a class="wikicreatelink" href="/xwiki/bin/edit... As I see, this snipplet is too old, maybe now need to change something. Unfortunatly, I am not a good programmer in a XWiki - I am a administrator. Maybe someone can help me ... I need to import users from LDAP. I already setup LDAP Authentication (AD) - all is greatly working: when new user logging - xwiki account automaticaly was creating. But I need to import some users beforehand, because I need to setup some rights in XWiki before user logged in. Ideal solution for me - not import all users from LDAP - but only some of them (or one by one) - filtered directly by SAMAccountName (filtered list of usernames from AD). Thanks in advice! -- View this message in context: http://xwiki.475771.n2.nabble.com/Snipplet-Import-users-from-LDAP-failed-tp4... Sent from the XWiki- Users mailing list archive at Nabble.com.
On 04/28/2010 12:19 AM, Colesnicov Eugen wrote:
I trying to use snipplet "Import users from LDAP" from code zone (http://code.xwiki.org/xwiki/bin/view/Snippets/ImportUsersFromLDAPSnippet), but it failed with error: Error number 4002 in 4: Error while parsing groovy page Sandbox.TestPage8 Wrapped Exception: startup failed: Script1.groovy: 20: unexpected token: wikicreatelink @ line 20, column 45. + res.get("cn") + "
Line 20 is: print ("" + res.get("cn") + "<a class="wikicreatelink" href="/xwiki/bin/edit...
As I see, this snipplet is too old, maybe now need to change something. Unfortunatly, I am not a good programmer in a XWiki - I am a administrator. Maybe someone can help me ...
The snippet got broken at some point, probably because somebody edited it with the old WYSIWYG editor. The code was broken because the code was replaced with the corresponding rendered HTML. I fixed it now, please try again. Note that the snippet is still in syntax 1.0, don't forget to change the syntax of the document where you'll put it.
I need to import users from LDAP. I already setup LDAP Authentication (AD) - all is greatly working: when new user logging - xwiki account automaticaly was creating. But I need to import some users beforehand, because I need to setup some rights in XWiki before user logged in.
Ideal solution for me - not import all users from LDAP - but only some of them (or one by one) - filtered directly by SAMAccountName (filtered list of usernames from AD).
Thanks in advice!
-- Sergiu Dumitriu http://purl.org/net/sergiu/
Big thanks Sergiu! Now snipplet works! I already imported domain users. Unfortunatly, result is not provide me what I need ... 2 Issues: 1) Not all users were imported and I looking for LDAP tree (ith LDAPExplorerTool) and I cannot understand why and which trees was lost. Other thing - were imported some domain groups as a users. 2) LDAP users, that manualy logged at XWiki, at their page have special object - XWiki.LDAPProfileClass with 2 properties "LDAP DN" and "LDAP user unique identifier". LDAP Users, that imported from LDAP with this snipplet haven't this object and haven't this properties ... -- View this message in context: http://xwiki.475771.n2.nabble.com/Snipplet-Import-users-from-LDAP-failed-tp4... Sent from the XWiki- Users mailing list archive at Nabble.com.
On Wed, Apr 28, 2010 at 12:18, Colesnicov Eugen <[email protected]> wrote:
Big thanks Sergiu!
Now snipplet works! I already imported domain users. Unfortunatly, result is not provide me what I need ...
2 Issues: 1) Not all users were imported and I looking for LDAP tree (ith LDAPExplorerTool) and I cannot understand why and which trees was lost. Other thing - were imported some domain groups as a users.
2) LDAP users, that manualy logged at XWiki, at their page have special object - XWiki.LDAPProfileClass with 2 properties "LDAP DN" and "LDAP user unique identifier". LDAP Users, that imported from LDAP with this snipplet haven't this object and haven't this properties ...
This snippet is based on very old LDAP authenticator and IMO it's dangerous to use it.
-- View this message in context: http://xwiki.475771.n2.nabble.com/Snipplet-Import-users-from-LDAP-failed-tp4... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
On Wed, Apr 28, 2010 at 12:29, Thomas Mortagne <[email protected]> wrote:
On Wed, Apr 28, 2010 at 12:18, Colesnicov Eugen <[email protected]> wrote:
Big thanks Sergiu!
Now snipplet works! I already imported domain users. Unfortunatly, result is not provide me what I need ...
2 Issues: 1) Not all users were imported and I looking for LDAP tree (ith LDAPExplorerTool) and I cannot understand why and which trees was lost. Other thing - were imported some domain groups as a users.
2) LDAP users, that manualy logged at XWiki, at their page have special object - XWiki.LDAPProfileClass with 2 properties "LDAP DN" and "LDAP user unique identifier". LDAP Users, that imported from LDAP with this snipplet haven't this object and haven't this properties ...
This snippet is based on very old LDAP authenticator and IMO it's dangerous to use it.
See http://jira.xwiki.org/jira/browse/XWIKI-4885
-- View this message in context: http://xwiki.475771.n2.nabble.com/Snipplet-Import-users-from-LDAP-failed-tp4... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
-- Thomas Mortagne
participants (3)
-
Colesnicov Eugen -
Sergiu Dumitriu -
Thomas Mortagne