Project

General

Profile

Access rights to the no

ivan liu
Added about 4 years ago

tigase-http-api How to set the administrator account ?

momo.png (43.1 KB) momo.png Access rights to the no
momo2.png (9.78 KB) momo2.png init.properties

Replies (13)

Added by ivan liu about 4 years ago

init.properties

config-type=--gen-config-def
--admins=admin@momo
--virt-hosts = momo
--debug=server
--monitoring=jmx:9050,http:9080,snmp:9060
--user-db=mysql
--user-db-uri = jdbc:mysql://localhost/tigasedb?user=root&password=123456&useUnicode=true&characterEncoding=UTF-8
--comp-name-1 = muc
--comp-class-1 = tigase.muc.MUCComponent
--comp-name-2 = pubsub
--comp-class-2 = tigase.pubsub.PubSubComponen
--comp-name-3=rest
--comp-class-3=tigase.http.rest.RestMessageReceiver
session_1/admins =qq@momo
rest/use-local-server[B]=true

Added by ivan liu about 4 years ago

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
        <title>Error 401 Unauthorized</title>
    </head>
    <body>
        <h2>HTTP ERROR: 401</h2>
        <p>Problem accessing /rest/user/qq@momo. Reason:

    </p>

    <hr />

    <i>

        <small>Powered by Jetty://</small>

    </i>

</body>

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Your admin account is the one you configure in @--admins=admin@momo@. You also need to provide matching account in the database (it's created by the installer, if not you need to create it by hand - either in database or using XMPP protocol).

Added by ivan liu about 4 years ago

Sorry, late reply

I use to create a configuration file

./scripts/db-create-mysql.sh tigase tigase tigasedb root tigase 192.168.10.128

But also failed login using tigase tigase (I do not know the account number and password refers to what? There is no login failure log)

momo3.png (12.5 KB) momo3.png

Added by Wojciech Kapcia TigaseTeam about 4 years ago

It looks like you only created schema which doesn't have any admin account. You need to create such by either:

  • registering it using XMPP (see @jabber:iq:register@);

  • executing TigAddUserPlainPw('admin@momo','pass'); in database;

Added by ivan liu about 4 years ago

thanks! Because there is no registration for the admin@momo .

Added by 王 晓文 about 1 year ago

I also have this problem, how to deal with? and I executed TigAddUserPlainPw('admin@momo','pass'); in database; but it don't work!

Added by Wojciech Kapcia TigaseTeam about 1 year ago

Can you access admin@momo user using XMPP client (Psi for example)? Is account admin@momo added to the administrators list (i.e. --admins=admin@momo) in etc/init.properties?

Added by 王 晓文 about 1 year ago

Wojciech Kapcia wrote:

Can you access admin@momo user using XMPP client (Psi for example)? Is account admin@momo added to the administrators list (i.e. --admins=admin@momo) in etc/init.properties?

Thanks for reply. Yes,I can access admin@app.im user using spark. And the account admin@app.im added to the administrators list in etc/init.properties.

Added by Wojciech Kapcia TigaseTeam 12 months ago

What you type exactly in the browser authetication prompt? You should put there full jid I.e. admin@app.im

Added by 王 晓文 12 months ago

thanks,I have solved the problem. A different version of tigase-http-api.jar solved my problem.

Added by 连生 张 3 months ago

Is there anything wrong with my configuration?Why can't my admin@laptop -DSVJGRMD log into the administrator account?\
Use spark client to log in successfully

Added by Wojciech Kapcia TigaseTeam 3 months ago

For separate issues please create dedicated topic in the forum.

(it seems that you [could log in](https://tigase.tech/attachments/6643/IZ%5DPO6X(X%7BEG1190@2XLA5S.png) in Spark - it has green status indicator)

    (1-13/13)