0
votes

Backdrop

I'm working on a chat application in android using the Ejabberd server and smack library. I am using the firebase phone auth as an external authentication program. I have achieved success in successfully signing up/logging in normal users from my phone so far.

Problem

Now I can't access my admin panel web interface because it provides a simple mechanism of pre-defined username and password to sign in as admin, whereas Firebase phone authentication uses a One Time Password mechanism.

What I have tried so far

  1. Tried adding whitelisted contacts in the firebase auth table as admin. Didn't succeed.
  2. Added another host with an internal authentication mechanism. Added an admin account from that host. Was able to sign in. But could not access my original admin panel as they became two different virtual hosts.
  3. Tried adding user using the following command

    ejabberdctl register username domain password

didn't work. Gave "Error: cannot_register" response.

What I am looking for

A way to sign onto the admin panel of my server. In case it's not possible, is there any way to disable the username/password prompt while signing onto the admin panel while on the testing phase and re-enable prompt in the production phase?

1
In case 2. «Added an admin account from that host. Was able to sign in. But could not access my original admin panel» That should work, if you configure the admin account properly in ejabberd.yml. You should edit your post and provide the configuration you added to grant admin rights to that account.Badlop
@Badlop thank you. I didn't know that I had to explicitly add an entry in the acl->admin->users field in the ejabberd.yml file. I did it. And it works now very well. To help others, if you write this in answer, I'll mark it as accepted, or should I answer it myself?Devershi Chandra

1 Answers

0
votes
  1. Added an admin account from that host. Was able to sign in. But could not access my original admin panel

That should work, if you grant admin rights to that account properly in ejabberd.yml.

You should edit your post and provide the configuration you added to grant admin rights to that account, and we'll see where's the problem.