Web-based Administration Interface Password

I just have installed ejabber.

I tried to create a new user with later admin test usage purpose: "someuser", having password "someuser" (both without quotes).

This new user has been created successfull.

Having user created, I added wrongly line on ejabberd.cfg:

{acl, admin, {someuser, "someuser"}}. instead of {acl, admin, {user, "someuser"}}.

Result was that after first unsuccessfull login usign someuser/someuser on http://jabber.mysite.com:5280/admin/ I never had to login using other admin u/p combination (using this time correct configuration line with admin privileges for existing ejabberd user).

Allways, I get bellow message:

=SUPERVISOR REPORT==== 9-Dec-2004::05:00:55 ===
Supervisor: {local,ejabberd_http_sup}
Context: child_terminated
Reason: {{case_clause,{someuser,"someuser"}},
[{acl,'-match_acl/2-fun-0-',3},
{lists,any,2},
{acl,match_acls,2},
{ejabberd_web,process_get,2},
{ejabberd_http,process_request,1},
{ejabberd_http,process_header,2},
{ejabberd_http,receive_headers,1},
{proc_lib,init_p,5}]}
Offender: [{pid,<0.367.0>},
{name,undefined},
{mfa,{ejabberd_http,start_link,
[{gen_tcp,#Port<0.378>},
[http_poll,web_admin]]}},
{restart_type,temporary},
{shutdown,brutal_kill},
{child_type,worker}]

and my session is ended.

Where I am wrong? Or is this a bug of ejabber?

Thanks,
Iulian Nastasache

override acl

On startup, ejabberd reads ejabberd.cfg and adds new AC to its ACL. You entered a wrong AC, and even if now your ejabberd.cfg is correct, that AC is still remembered by ejabberd.

You can remove ejabberd ACL in two ways:

  • with the web interface: you can't use this right now :)
  • putting this line at the begining of ejabberd.cfg:
    override_acls.

Sorry, I cannot understand: h

Sorry, I cannot understand: how exactly to create user-password pair with administrator rights for web interface?

Where we set login and where password in line

{acl, admin, {user, "someuser"}}.

?

I already have uncommented "override_acls." line in begin of CFG file.

Creation of admin account

Set in the configfile as you already said: "{acl, admin, {user, "someuser"}}.", then start a Jabber client like Tkabber and create a new account on your server (see documentaion of that client) with the name "someuser" and a password. After doing that you can use that account to enter the webadmin interface.
--
sander

It's easier than you think:

It's easier than you think:

  • you don't create specific webadmin accounts
  • you don't specify passwords in ejabberd.cfg

You just do this:

  1. you have a normal account on your ejabberd server. Example: name: bob; password: bopas599
  2. and then you give admin rights to that account on ejabberd.cfg:
    {acl, admin, {user, "bob"}}.
  3. when you try to login on webadmin, the user is 'bob' and the password is the same password you specified for the jabber account: 'bopas599'.

I hope it is easy...

Using WinXP Pro SP2 Current OS
Using Erlang OTP R10B
Using Win32OpenSSL-v0.9.7f

All installed, just installed the SSL for the heck of it.

I did as you said badlop. I edited my cfg and everything, played with the override_acls, uncommented that, created a user with password and the like and everytime either IE or Firefox, I log in and it says "Not Allowed". Ports of all sorts are open to get access to this.

What am I doing wrong?

Error messages: 401 Unauth

Error messages:

  • 401 Unauthorized: you did not enter a valid username/password.
  • Not Allowed: you entered a valid username/password, but that account has not enought privileges (it's not an admin).

Better late than never, I suppose

I don't know if this will help you, being 20 days later and all, but hopefully it will help others who go searching here later on.

In my case, logging in as "trejkaz" failed. Logging in as "trejkaz@localhost" with the same password succeeded.

I don't recall seeing anywhere in the guides which said to use the full JID of the admin user to login, but apparently that's the trick.

it has changed in 0.9

  • on ejabberd 0.7.5 it was "trejkaz"
  • since ejabberd 0.9, it will be "trejkaz@localhost"

Syndicate content