powered by Jive Software

Can't login as Admin

Hi,

I got a strange problem that someone might be able to help me with. I have a fresh install of openfire (latest version) and i need openfire to authenticate users from a different database on a different server. Thats fine and done it no problem.

The problem i have is that i can no longer login to the admin console. I know it says that admins can login locally only and not from a remote database but how do i tell the server.xml to authenticate the admin locally and the clients remotely.

This is a snap shot of my server.xml

<jive>

<provider>

<auth>

<className>org.jivesoftware.openfire.auth.JDBCAuthProvider</className& gt;

</auth>

<user>

<className>org.jivesoftware.openfire.user.JDBCUserProvider</className& gt;

</user>

</provider>

<jdbcProvider>

<driver>com.mysql.jdbc.Driver</driver>

<connectionString>jdbc:mysql://ip.ip.ip.ip/database*?user=username*&p assword=password*</connectionString>

</jdbcProvider>

<jdbcAuthProvider>

<passwordSQL>SELECT password FROM users WHERE username=?</passwordSQL>

<passwordType>sha1</passwordType>

</jdbcAuthProvider>

<jdbcUserProvider>

<loadUserSQL>SELECT first_name,last_name FROM users WHERE username=?</loadUserSQL>

<userCountSQL>SELECT COUNT(*) FROM users</userCountSQL>

<allUsersSQL>SELECT username FROM users</allUsersSQL>

<searchSQL>SELECT username FROM users WHERE</searchSQL>

<usernameField>username</usernameField>

<nameField>first_name</nameField>

<emailField>last_name</emailField>

</jdbcUserProvider>

<adminConsole>

<!-- Disable either port by setting the value to -1 -->

<port>9090</port>

<securePort>9091</securePort>

</adminConsole>

<admin>

<!-- Use this section to define users that will have admin privileges. Below,

you will find two ways to specify which users are admins. Admins will

have access to the admin console (only local users) and may have also access

to other functionalities like ad-hoc commands. -->

<!-- By default, only the user with the username “admin” can login

to the admin console. Alternatively, you can specify a comma-delimitted

list usernames that should be authorized to login to the admin console

by setting the <authorizedUsernames> field below. -->

<!-- <authorizedUsernames></authorizedUsernames> -->

<!-- Comma-delimitted list of bare JIDs. The JIDs may belong to local

or remote users. -->

<!-- <authorizedJIDs></authorizedJIDs> -->

</admin>

<locale>en</locale>

<!-- Network settings. By default, Openfire will bind to all network interfaces.

Alternatively, you can specify a specific network interfaces that the server

will listen on. For example, 127.0.0.1. This setting is generally only useful

on multi-homed servers. -->

<!–

<network>

<interface></interface>

</network>

–>

<connectionProvider>

<className>org.jivesoftware.database.DefaultConnectionProvider</classN ame>

</connectionProvider>

<database>

<defaultProvider>

<driver>com.mysql.jdbc.Driver</driver>

<serverURL>jdbc:mysql://localhost:3306/openfire</serverURL>

<username>username*</username>

<password>password*</password>

<minConnections>5</minConnections>

<maxConnections>15</maxConnections>

<connectionTimeout>1.0</connectionTimeout>

</defaultProvider>

</database>

  • Removed for security purposes.

Thanks

Within the <admin> tags you need to add this section:

<authorizedUsernames>johnd</authorizedUsernames> substitute a real userneame for johnd.

Hi,

Does that mean i need to create an Admin account on the remote database? - I did try it but it just kept failing on the Admin Console - I could login to the client no problem. This was confusing me:

" Admins will have access to the admin console (only local users) "

This suggests that i cannot have an admin account on a remote database for which i want to us to access the Admin Console. I don’t mind this since the admin account is held locally on the MySQL database, but since ive added remote authentication openfire will not authenticate admin for us on the Console.

Any ideas?

Hi,

Well just don’t know what to say. ?:expressionless: i followed what you wrote used one of the accounts listed on the remote server added that account within the tags and entered the username and password into the console. It worked!

Just don’t know what to say about that, i know i tried it several times without success, maybe i was slotting into the JID field who knows! Thanks for your help

Hi,

as your admin is likely not named “admin” you need to use the " around it) and insert your user name there. Then restart Openfire and you should be able to login.

LG