ejabberd - Comments for "Ejabberd tries authenticate user from host, which is not allowed to connect on certain port." https://www.ejabberd.im/node/3393 en Local Admin after enabling LDAP - ejabberd https://www.ejabberd.im/node/3393#comment-54031 <p>FIXED,</p> <p>1. Install ejabberd<br /> 2. Enable ldap as per documentation<br /> 3. Create an account in active directory that matches the account you specified when installing ejabberd<br /> 4. Make sure the account is in your ldpa_base OU, otherwise you will be struggling for hours like me.</p> <p>I hope this helps some one.</p> <p>Marco.</p> <div class="quote-msg"> <div class="quote-author"><em>badlop</em> wrote:</div> <div class="quote-msg"> <div class="quote-author"><em>mrojas73</em> wrote:</div> <p>Hi,</p> <p>I enabled LDAP in my new installation and I can connect using accounts from Active Directory but can't login to the admin portal any more using admin@servername.</p> <p>Is there a setting that needs to be added to the configuration to re-enable the built-in account?</p> <p>Thank you.</p></div> <p>You didn't get a concept right: an admin account in ejabberd is just a normal Jabber account that you grand administrative privilege in ejabberd.cfg.</p> <p>If your old account with admin rights was <noindex><a href="mailto:admin@example.org" rel="nofollow" >admin@example.org</a></noindex>, and you changed auth_method from internal to ldap, now the admin privilege is still granted to the account <noindex><a href="mailto:admin@example.org" rel="nofollow" >admin@example.org</a></noindex>, even if it does not exist yet.</p> <p>So, create the correct account in LDAP and use its credentials to login in Web Admin. </p></div> <p>badlop,</p> <p>Thank you very much for taking the time to reply,</p> <p>I understand what you said, but even after creating the admin account in Active Directory I am not able to login to the GUI.</p> <p>So, decided to create a new account in AD called ejabberd with domain admin rights just in case. Reinstalled ejabberd and use account ejabberd during installation, to make sure everything worked I loged in before making changes to the system. Everything worked great so. I enabled LDAP by following the documentation. I don't get any errors in the logs but I can't authenticate to the admin page using ejabberd anymore.</p> <p>Here is how my ldap is configured:</p> <p>%%{auth_method, internal}.<br /> {auth_method, ldap}.<br /> {ldap_servers, ["domain.controler.name"]}.<br /> {ldap_uids, [{"sAMAccountName"}]}.<br /> {ldap_base, "ou=users,dc=domain,dc=local"}.<br /> {ldap_rootdn, "cn=Administrator,cn=users,dc=domain,dc=local"}.<br /> {ldap_password, "********"}.</p> <p>I am thinking I need to add something to the acl area to allow the local admin access to web admin page, but I am not sure.</p> <p>Any help would be appreciated.</p> <p>Thank you.</p> Sun, 22 Feb 2009 15:37:35 +0000 mrojas73 comment 54031 at https://www.ejabberd.im admin account = Jabber account + admin privilege https://www.ejabberd.im/node/3393#comment-54026 <div class="quote-msg"> <div class="quote-author"><em>mrojas73</em> wrote:</div> <p>Hi,</p> <p>I enabled LDAP in my new installation and I can connect using accounts from Active Directory but can't login to the admin portal any more using admin@servername.</p> <p>Is there a setting that needs to be added to the configuration to re-enable the built-in account?</p> <p>Thank you.</p></div> <p>You didn't get a concept right: an admin account in ejabberd is just a normal Jabber account that you grand administrative privilege in ejabberd.cfg.</p> <p>If your old account with admin rights was <noindex><a href="mailto:admin@example.org" rel="nofollow" >admin@example.org</a></noindex>, and you changed auth_method from internal to ldap, now the admin privilege is still granted to the account <noindex><a href="mailto:admin@example.org" rel="nofollow" >admin@example.org</a></noindex>, even if it does not exist yet.</p> <p>So, create the correct account in LDAP and use its credentials to login in Web Admin.</p> Thu, 19 Feb 2009 23:12:17 +0000 mfoss comment 54026 at https://www.ejabberd.im Builtin Admin Question https://www.ejabberd.im/node/3393#comment-54025 <p>Hi,</p> <p>I enabled LDAP in my new installation and I can connect using accounts from Active Directory but can't login to the admin portal any more using admin@servername.</p> <p>Is there a setting that needs to be added to the configuration to re-enable the built-in account?</p> <p>Thank you.</p> Thu, 19 Feb 2009 22:14:37 +0000 mrojas73 comment 54025 at https://www.ejabberd.im Thank you very much! This is https://www.ejabberd.im/node/3393#comment-54024 <p>Thank you very much!<br /> This is absolutely right solution - no extra LDAP queries for not allowed hosts.</p> Thu, 19 Feb 2009 18:24:15 +0000 ask0n comment 54024 at https://www.ejabberd.im Try those access options https://www.ejabberd.im/node/3393#comment-54022 <div class="quote-msg"> <div class="quote-author"><em>ask0n</em> wrote:</div> <p>And access rule:<br /> <code>{access, c2s_host1, [{deny, blocked}, {allow, host1}]}.</code> </p></div> <p>The rules in that Access option don't cover all the possible cases. For example, what to do with a JID that is not 'blocked', not 'host1'? It is better to add an 'all' rule at the end of each Access option, to ensure you cover all the possible cases.</p> <p>I think this example will do what you want</p> <div class="codeblock"><code>{hosts, [&quot;host1.lan&quot;, &quot;host2.lan&quot;]}. <p>{listen,<br /> [<br />&nbsp; {5222, ejabberd_c2s, [<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {certfile, &quot;/etc/ejabberd/ssl.pem&quot;}, starttls,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {access, c2s_5222},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {shaper, c2s_shaper},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {max_stanza_size, 65536}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]},<br />&nbsp; {5223, ejabberd_c2s, [<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {certfile, &quot;/etc/ejabberd/ssl.pem&quot;}, tls,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {access, c2s_5223},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {shaper, c2s_shaper},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {max_stanza_size, 65536}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]},<br />&nbsp; ...<br /> ]}.</p> <p>{acl, host1, {server, &quot;host1.lan&quot;}}.<br />{acl, host2, {server, &quot;host2.lan&quot;}}.</p> <p>%% Only users of host1 can connect to 5222:<br />{access, c2s_5222, [{allow, host1}, {deny, all}]}.</p> <p>%% Port 5223 can be used by users of host1 and host2:<br />{access, c2s_5223, [{allow, host1}, {allow, host2}, {deny, all}]}.</p></code></div> Wed, 18 Feb 2009 18:58:40 +0000 mfoss comment 54022 at https://www.ejabberd.im