<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://kb.rvmgroup.it/index.php?action=history&amp;feed=atom&amp;title=Importare_degli_utenti_in_Mantis</id>
	<title>Importare degli utenti in Mantis - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://kb.rvmgroup.it/index.php?action=history&amp;feed=atom&amp;title=Importare_degli_utenti_in_Mantis"/>
	<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Importare_degli_utenti_in_Mantis&amp;action=history"/>
	<updated>2026-05-06T07:47:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://kb.rvmgroup.it/index.php?title=Importare_degli_utenti_in_Mantis&amp;diff=6374&amp;oldid=prev</id>
		<title>Gabriele.vivinetto at 13:31, 6 August 2009</title>
		<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Importare_degli_utenti_in_Mantis&amp;diff=6374&amp;oldid=prev"/>
		<updated>2009-08-06T13:31:30Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:31, 6 August 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Script di esempio:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Importazione da LDAP==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     #!/bin/sh&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     #!/bin/sh&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gabriele.vivinetto</name></author>
	</entry>
	<entry>
		<id>https://kb.rvmgroup.it/index.php?title=Importare_degli_utenti_in_Mantis&amp;diff=6352&amp;oldid=prev</id>
		<title>Gabriele.vivinetto: New page: *Script di esempio: &lt;pre&gt;     #!/bin/sh      # dump all the ldap Users and add them to the userdb     # most config stuff (db user, etc) is taken from mantis     # while this script works ...</title>
		<link rel="alternate" type="text/html" href="https://kb.rvmgroup.it/index.php?title=Importare_degli_utenti_in_Mantis&amp;diff=6352&amp;oldid=prev"/>
		<updated>2009-07-29T16:25:38Z</updated>

		<summary type="html">&lt;p&gt;New page: *Script di esempio: &amp;lt;pre&amp;gt;     #!/bin/sh      # dump all the ldap Users and add them to the userdb     # most config stuff (db user, etc) is taken from mantis     # while this script works ...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;*Script di esempio:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
&lt;br /&gt;
    # dump all the ldap Users and add them to the userdb&lt;br /&gt;
    # most config stuff (db user, etc) is taken from mantis&lt;br /&gt;
    # while this script works fine, it probably doesn&amp;#039;t perform well&lt;br /&gt;
    # with lots of users. in my scenario i only have a couple hundred&lt;br /&gt;
    # users and i dont expect any problems.&lt;br /&gt;
&lt;br /&gt;
    # configure the following line so it knows how to access your server&lt;br /&gt;
    LDAP=&amp;quot;ldapsearch -LLL -D cn=Manager,dc=example,dc=com -wsecretpasswd &amp;quot;&lt;br /&gt;
&lt;br /&gt;
    for LDAP_UID in `$LDAP &amp;#039;(&amp;amp;(objectClass=inetOrgPerson)(uid=*))&amp;#039; uid | awk &amp;#039;/^uid:/ {print $2}&amp;#039;`; do&lt;br /&gt;
&lt;br /&gt;
       REALNAME=`$LDAP &amp;quot;(&amp;amp;(objectClass=inetOrgPerson)(uid=$LDAP_UID))&amp;quot; cn | awk -F &amp;quot;: &amp;quot; &amp;#039;/^cn:/ {print $2}&amp;#039;`&lt;br /&gt;
       EMAIL=`$LDAP &amp;quot;(&amp;amp;(objectClass=inetOrgPerson)(uid=$LDAP_UID))&amp;quot; mail | awk &amp;#039;/^mail:/ {print $2}&amp;#039;`&lt;br /&gt;
&lt;br /&gt;
       MANTIS_USER_ID=`php -r &amp;#039;include(&amp;quot;/var/www/localhost/htdocs/mantisbt/config_defaults_inc.php&amp;quot;);&lt;br /&gt;
          include(&amp;quot;/var/www/localhost/htdocs/mantisbt/config_inc.php&amp;quot;);&lt;br /&gt;
          include(&amp;quot;/var/www/localhost/htdocs/mantisbt/core.php&amp;quot;);&lt;br /&gt;
          echo user_get_id_by_name(&amp;quot;&amp;#039;$LDAP_UID&amp;#039;&amp;quot;);&amp;#039;`&lt;br /&gt;
&lt;br /&gt;
       if [[ &amp;quot;$MANTIS_USER_ID&amp;quot; -eq &amp;quot;&amp;quot; ]]; then&lt;br /&gt;
          echo &amp;#039;&amp;lt;?php&lt;br /&gt;
             include(&amp;quot;/var/www/localhost/htdocs/mantisbt/core/constant_inc.php&amp;quot;);&lt;br /&gt;
             include(&amp;quot;/var/www/localhost/htdocs/mantisbt/config_defaults_inc.php&amp;quot;);&lt;br /&gt;
             include(&amp;quot;/var/www/localhost/htdocs/mantisbt/config_inc.php&amp;quot;);&lt;br /&gt;
             include(&amp;quot;/var/www/localhost/htdocs/mantisbt/core.php&amp;quot;);&lt;br /&gt;
             user_create(&amp;quot;&amp;#039;$LDAP_UID&amp;#039;&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;#039;$EMAIL&amp;#039;&amp;quot;);&lt;br /&gt;
             $user_id = user_get_id_by_name(&amp;quot;&amp;#039;$LDAP_UID&amp;#039;&amp;quot;);&lt;br /&gt;
             user_set_field($user_id, &amp;quot;realname&amp;quot;, &amp;quot;&amp;#039;$REALNAME&amp;#039;&amp;quot;);&amp;#039; | php&lt;br /&gt;
&lt;br /&gt;
       else&lt;br /&gt;
          echo &amp;#039;&amp;lt;?php&lt;br /&gt;
             include(&amp;quot;/var/www/localhost/htdocs/mantisbt/core/constant_inc.php&amp;quot;);&lt;br /&gt;
             include(&amp;quot;/var/www/localhost/htdocs/mantisbt/config_defaults_inc.php&amp;quot;);&lt;br /&gt;
             include(&amp;quot;/var/www/localhost/htdocs/mantisbt/config_inc.php&amp;quot;);&lt;br /&gt;
             include(&amp;quot;/var/www/localhost/htdocs/mantisbt/core.php&amp;quot;);&lt;br /&gt;
             user_set_field(&amp;#039;$MANTIS_USER_ID&amp;#039;, &amp;quot;username&amp;quot;, &amp;quot;&amp;#039;$LDAP_UID&amp;#039;&amp;quot;);&lt;br /&gt;
             user_set_field(&amp;#039;$MANTIS_USER_ID&amp;#039;, &amp;quot;realname&amp;quot;, &amp;quot;&amp;#039;$REALNAME&amp;#039;&amp;quot;);&lt;br /&gt;
             user_set_field(&amp;#039;$MANTIS_USER_ID&amp;#039;, &amp;quot;email&amp;quot;, &amp;quot;&amp;#039;$EMAIL&amp;#039;&amp;quot;);&amp;#039; | php&lt;br /&gt;
       fi&lt;br /&gt;
    done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Riferimenti==&lt;br /&gt;
*[http://www.mantisbt.org/forums/viewtopic.php?f=4&amp;amp;t=6183&amp;amp;start=0 Mantis Forums • View topic - LDAP User import per Cron]&lt;/div&gt;</summary>
		<author><name>Gabriele.vivinetto</name></author>
	</entry>
</feed>