Unable to login to Alfresco using "admin" (/alfresco/service/api/login?u=admin&pw=admin)

cancel
Showing results for 
Search instead for 
Did you mean: 
Active Member II

Unable to login to Alfresco using "admin" (/alfresco/service/api/login?u=admin&pw=admin)

Jump to solution

Hello,

In a previous post, I was dealing with many problems on my Alfresco-installation. Now most things are working, but I still cannot log in. When I try to login to Alfresco on /share I get the following in my access_log (I have activated most debugging-options on /share):

127.0.0.1 - CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB [26/Jul/2017:11:00:15 +0200] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1500848031508&toCommitTime=1501078431508&maxResults=2000 HTTP/1.1" 200 115
127.0.0.1 - - [26/Jul/2017:11:00:16 +0200] "POST /alfresco/s/api/login HTTP/1.1" 403 369
192.168.211.1 - - [26/Jul/2017:11:00:16 +0200] "POST /share/page/dologin HTTP/1.1" 302 -
127.0.0.1 - - [26/Jul/2017:11:00:16 +0200] "GET /alfresco/s/remoteadm/has/alfresco/site-data/configurations/slingshot.site.configuration.xml?s=sitestore HTTP/1.1" 200 5
127.0.0.1 - - [26/Jul/2017:11:00:16 +0200] "GET /alfresco/s/remoteadm/has/alfresco/site-data/pages/site-index.xml?s=sitestore HTTP/1.1" 200 5
127.0.0.1 - - [26/Jul/2017:11:00:16 +0200] "GET /alfresco/s/remoteadm/has/alfresco/site-data/themes/lightTheme.xml?s=sitestore HTTP/1.1" 200 5
127.0.0.1 - - [26/Jul/2017:11:00:16 +0200] "GET /alfresco/s/remoteadm/has/alfresco/site-data/pages/slingshot-login.xml?s=sitestore HTTP/1.1" 200 5
127.0.0.1 - - [26/Jul/2017:11:00:16 +0200] "GET /alfresco/s/remoteadm/has/alfresco/site-data/template-instances/simple-guest.xml?s=sitestore HTTP/1.1" 200 5
127.0.0.1 - - [26/Jul/2017:11:00:16 +0200] "GET /alfresco/s/remoteadm/has/alfresco/site-data/template-types/org/alfresco/simple-guest.xml?s=sitestore HTTP/1.1" 200 5
127.0.0.1 - - [26/Jul/2017:11:00:16 +0200] "GET /alfresco/s/remoteadm/has/alfresco/site-data/template-types/webtemplate.xml?s=sitestore HTTP/1.1" 200 5
127.0.0.1 - - [26/Jul/2017:11:00:16 +0200] "GET /alfresco/s/remoteadm/has/alfresco/site-data/components/global.head-title.xml?s=sitestore HTTP/1.1" 200 5
127.0.0.1 - - [26/Jul/2017:11:00:16 +0200] "GET /alfresco/s/remoteadm/has/alfresco/site-data/components/global.bootstrap.xml?s=sitestore HTTP/1.1" 200 5
127.0.0.1 - - [26/Jul/2017:11:00:16 +0200] "GET /alfresco/s/remoteadm/has/alfresco/site-data/components/global.head-resources.xml?s=sitestore HTTP/1.1" 200 5
127.0.0.1 - - [26/Jul/2017:11:00:16 +0200] "GET /alfresco/s/remoteadm/has/alfresco/site-data/components/page.components.slingshot-login.xml?s=sitestore HTTP/1.1" 200 5
127.0.0.1 - - [26/Jul/2017:11:00:16 +0200] "GET /alfresco/s/remoteadm/has/alfresco/site-data/chrome/slingshot-region-chrome.xml?s=sitestore HTTP/1.1" 200 5
127.0.0.1 - - [26/Jul/2017:11:00:16 +0200] "GET /alfresco/s/remoteadm/has/alfresco/site-data/component-types/webscript.xml?s=sitestore HTTP/1.1" 200 5
127.0.0.1 - - [26/Jul/2017:11:00:16 +0200] "GET /alfresco/s/remoteadm/has/alfresco/site-data/chrome/.xml?s=sitestore HTTP/1.1" 200 5
127.0.0.1 - - [26/Jul/2017:11:00:16 +0200] "GET /alfresco/s/remoteadm/has/alfresco/site-data/chrome/default-sub-component-chrome.xml?s=sitestore HTTP/1.1" 200 5
192.168.211.1 - - [26/Jul/2017:11:00:16 +0200] "GET /share/page/?error=true HTTP/1.1" 200 37887

When I try to open /alfresco/s/api/login?u=admin&pw=admin

 

I get following response:

<response>

<status>

<code>403</code>

<name>Forbidden</name>

<description>Server understood the request but refused to fulfill it.</description>

</status>

<message>06250013 Login failed</message>

<exception/>

<callstack></callstack>

<server>Community v5.0.0 (d r99759-b2) schema 8.022</server>

<time>25.07.2017 10:02:11</time>

</response>

My admin-user is defined with default "admin"-password as illustrated in many other posts and documentation:

+---------+----------+----------------------------------+-------------+
| node_id | qname_id | hash_pass                        | user_string |
+---------+----------+----------------------------------+-------------+
|       4 |       11 | 209c6174da490caeb422f3fa5a7ae634 | admin       |

+---------+----------+----------------------------------+-------------+

I did try putting the default hash (209c6174da490caeb422f3fa5a7ae634), and an hash I got on my host:

# echo admin | openssl md4
(stdin)= 23416c5cf7b6d5f466a7f10590a2b99c

On other sites I even get another hash for "admin":

f9d4049dd6a4dc35d40e5265954b2a46 (MD4 hash calculator - ABunchOfUtils)

f9d4049dd6a4dc35d40e5265954b2a46 (Converting your file)

I get the same error with this hash to.

Also I am not sure about the meaning of 369 in: ["POST /alfresco/s/api/login HTTP/1.1" 403 369"]

Before it was not 369 but 368 so I think it's something that changes?

I also added admin as adminuser in alfresco-global.properties:

alfresco_user_store.adminusername=admin

At the end I did read a lot of posts, but none helps me with my login issue. Anyone able to help? I would be very grateful.

1 Solution

Accepted Solutions
Active Member II

Re: Unable to login to Alfresco using "admin" (/alfresco/service/api/login?u=admin&pw=admin)

Jump to solution

Well using the correct database makes things easier.

As I did create a database "alfresco2", I did still change password in "alfresco", so wrong DB. The working hash for "admin" is "209c6174da490caeb422f3fa5a7ae634". Thanks to ‌ for his advice!

After following the following procedure it did work:

mysql> SELECT anp1.node_id,        anp1.qname_id,        anp1.string_value as hash_pass,        anp2.string_value as user_string FROM alf_node_properties anp1         INNER JOIN alf_qname aq1            ON aq1.id       = anp1.qname_id         INNER JOIN alf_node_properties anp2             ON anp2.node_id = anp1.node_id         INNER JOIN alf_qname aq2                        ON aq2.id       = anp2.qname_id WHERE aq1.local_name    = 'password' AND aq2.local_name    = 'username';
+---------+----------+----------------------------------+-------------+
| node_id | qname_id | hash_pass                        | user_string |
+---------+----------+----------------------------------+-------------+
|       4 |       11 | .................................| admin       |
|     569 |       11 | 0eeb8b5ee6e96f1a8443edfb1dfc36ad | abeecher    |
|     570 |       11 | 0eeb8b5ee6e96f1a8443edfb1dfc36ad | mjackson    |
+---------+----------+----------------------------------+-------------+
3 rows in set (0.00 sec)

mysql> UPDATE alf_node_properties    SET string_value='209c6174da490caeb422f3fa5a7ae634' where node_id=4 and qname_id=11;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

View solution in original post

3 Replies
Customer

Re: Unable to login to Alfresco using "admin" (/alfresco/service/api/login?u=admin&pw=admin)

Jump to solution

Hi:

I use this command for generating MD4 passwords in Alfresco, for example for user admin and passwd admin too:

$ printf '%s' "admin" | iconv -t utf16le | openssl md4
(stdin)= 209c6174da490caeb422f3fa5a7ae634

Hope it helps.

--C.

Active Member II

Re: Unable to login to Alfresco using "admin" (/alfresco/service/api/login?u=admin&pw=admin)

Jump to solution

Thanks, this gives me:

# printf '%s' "admin" | iconv -t utf16le | openssl md4
(stdin)= 209c6174da490caeb422f3fa5a7ae634

But I can still not login to Alfresco...

Active Member II

Re: Unable to login to Alfresco using "admin" (/alfresco/service/api/login?u=admin&pw=admin)

Jump to solution

Well using the correct database makes things easier.

As I did create a database "alfresco2", I did still change password in "alfresco", so wrong DB. The working hash for "admin" is "209c6174da490caeb422f3fa5a7ae634". Thanks to ‌ for his advice!

After following the following procedure it did work:

mysql> SELECT anp1.node_id,        anp1.qname_id,        anp1.string_value as hash_pass,        anp2.string_value as user_string FROM alf_node_properties anp1         INNER JOIN alf_qname aq1            ON aq1.id       = anp1.qname_id         INNER JOIN alf_node_properties anp2             ON anp2.node_id = anp1.node_id         INNER JOIN alf_qname aq2                        ON aq2.id       = anp2.qname_id WHERE aq1.local_name    = 'password' AND aq2.local_name    = 'username';
+---------+----------+----------------------------------+-------------+
| node_id | qname_id | hash_pass                        | user_string |
+---------+----------+----------------------------------+-------------+
|       4 |       11 | .................................| admin       |
|     569 |       11 | 0eeb8b5ee6e96f1a8443edfb1dfc36ad | abeecher    |
|     570 |       11 | 0eeb8b5ee6e96f1a8443edfb1dfc36ad | mjackson    |
+---------+----------+----------------------------------+-------------+
3 rows in set (0.00 sec)

mysql> UPDATE alf_node_properties    SET string_value='209c6174da490caeb422f3fa5a7ae634' where node_id=4 and qname_id=11;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

View solution in original post