user_sql does not work correctly on recent versions of owncloud / nextcloud. sql-based users can't log in on the web-frontend but logins via webdav, caldav and carddav work fine.
to my knowledge problems started to appear in version 9.0
any ideas?
user_sql does not work correctly on recent versions of owncloud / nextcloud. sql-based users can't log in on the web-frontend but logins via webdav, caldav and carddav work fine.
to my knowledge problems started to appear in version 9.0
any ideas?
That's strange, I'm running on NextCloud 9 for quite some time now (actually, since its release).
I tested it on ownCloud 9.1 just yesterday and I did not notice any problems.
Do you have any other authentication plugin installed? Can you provide debug logs while trying to log in?
i'm not running any extra authentication plugins. the i'm using postgresql as the database backend.
{"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Trying to load settings for domain: oc.domain.net","level":0,"time":"September 01, 2016 15:39:05","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Loaded settings for domain: oc.domain.net","level":0,"time":"September 01, 2016 15:39:05","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"userExists() for UID: cacheVal: ","level":0,"time":"September 01, 2016 15:39:05","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Entering checkPassword() for UID: buti@domain.net","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Returning mapped UID: buti@domain.net","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Entering runQuery for type: getPass","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Preparing query: SELECT password FROM mailbox WHERE username = :uid AND active","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Executing query...","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Fetching result...","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Encrypting and checking password","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Entering private pacrypt()","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"pacrypt() done, return","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Passwords matching, return true (buti@domain.net)","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Entering checkPassword() for UID: buti@domain.net","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Returning mapped UID: buti@domain.net","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Entering runQuery for type: getPass","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Preparing query: SELECT password FROM mailbox WHERE username = :uid AND active","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Executing query...","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Fetching result...","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Encrypting and checking password","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Entering private pacrypt()","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"pacrypt() done, return","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Passwords matching, return true (buti@domain.net)","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Entering getHome for UID: buti@domain.net","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"buti@domain.net"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Returning mapped UID: buti@domain.net","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"buti@domain.net"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"getHome with static selected","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"buti@domain.net"} {"reqId":"JWgYCmHNectDS/a8rJ0z","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Returning getHome for UID: buti@domain.net with Home /home/data/owncloud/buti@domain.net","level":0,"time":"September 01, 2016 15:39:07","method":"POST","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"buti@domain.net"} {"reqId":"CAUqfvbWaTuxR1F8cS7q","remoteAddr":"rem.ote.ip.adr","app":"core","message":"Login failed: 'buti@domain.net' (Remote IP: 'rem.ote.ip.adr')","level":2,"time":"September 01, 2016 15:39:07","method":"GET","url":"/apps/files/","user":"buti@domain.net"} {"reqId":"CAUqfvbWaTuxR1F8cS7q","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Trying to load settings for domain: oc.domain.net","level":0,"time":"September 01, 2016 15:39:07","method":"GET","url":"/apps/files/","user":"--"} {"reqId":"CAUqfvbWaTuxR1F8cS7q","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Loaded settings for domain: oc.domain.net","level":0,"time":"September 01, 2016 15:39:07","method":"GET","url":"/apps/files/","user":"--"} {"reqId":"CAUqfvbWaTuxR1F8cS7q","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"userExists() for UID: cacheVal: ","level":0,"time":"September 01, 2016 15:39:07","method":"GET","url":"/apps/files/","user":"--"} {"reqId":"CAUqfvbWaTuxR1F8cS7q","remoteAddr":"rem.ote.ip.adr","app":"no app in context","message":"Current user is not logged in","level":0,"time":"September 01, 2016 15:39:07","method":"GET","url":"/apps/files/","user":"--"} {"reqId":"RIhtAlYUE8VwjPyp8kUa","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Trying to load settings for domain: oc.domain.net","level":0,"time":"September 01, 2016 15:39:07","method":"GET","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"RIhtAlYUE8VwjPyp8kUa","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Loaded settings for domain: oc.domain.net","level":0,"time":"September 01, 2016 15:39:07","method":"GET","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"RIhtAlYUE8VwjPyp8kUa","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"userExists() for UID: cacheVal: ","level":0,"time":"September 01, 2016 15:39:07","method":"GET","url":"/login?redirect_url=%252Fapps%252Ffiles%252F","user":"--"} {"reqId":"ergtvLMoITQLgLpj5kTt","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Trying to load settings for domain: oc.domain.net","level":0,"time":"September 01, 2016 15:39:07","method":"GET","url":"/apps/theming/styles?v=0","user":"--"} {"reqId":"ergtvLMoITQLgLpj5kTt","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Loaded settings for domain: oc.domain.net","level":0,"time":"September 01, 2016 15:39:07","method":"GET","url":"/apps/theming/styles?v=0","user":"--"} {"reqId":"ergtvLMoITQLgLpj5kTt","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"userExists() for UID: cacheVal: ","level":0,"time":"September 01, 2016 15:39:07","method":"GET","url":"/apps/theming/styles?v=0","user":"--"} {"reqId":"ObaaUTgJCVPkPqFRpIsx","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Trying to load settings for domain: oc.domain.net","level":0,"time":"September 01, 2016 15:39:07","method":"GET","url":"/core/js/oc.js?v=a1639b67f8c63c8070706945c85f78a5","user":"--"} {"reqId":"ObaaUTgJCVPkPqFRpIsx","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Loaded settings for domain: oc.domain.net","level":0,"time":"September 01, 2016 15:39:07","method":"GET","url":"/core/js/oc.js?v=a1639b67f8c63c8070706945c85f78a5","user":"--"} {"reqId":"ObaaUTgJCVPkPqFRpIsx","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"userExists() for UID: cacheVal: ","level":0,"time":"September 01, 2016 15:39:07","method":"GET","url":"/core/js/oc.js?v=a1639b67f8c63c8070706945c85f78a5","user":"--"} {"reqId":"zrFnyDeqhe6XEBNIUMM7","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Trying to load settings for domain: oc.domain.net","level":0,"time":"September 01, 2016 15:39:08","method":"GET","url":"/apps/theming/js/theming?v=0","user":"--"} {"reqId":"zrFnyDeqhe6XEBNIUMM7","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Loaded settings for domain: oc.domain.net","level":0,"time":"September 01, 2016 15:39:08","method":"GET","url":"/apps/theming/js/theming?v=0","user":"--"} {"reqId":"zrFnyDeqhe6XEBNIUMM7","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"userExists() for UID: cacheVal: ","level":0,"time":"September 01, 2016 15:39:08","method":"GET","url":"/apps/theming/js/theming?v=0","user":"--"} {"reqId":"yeZ1cAmm68BeSLed3Ijn","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Trying to load settings for domain: oc.domain.net","level":0,"time":"September 01, 2016 15:39:08","method":"GET","url":"/cron.php","user":"--"} {"reqId":"yeZ1cAmm68BeSLed3Ijn","remoteAddr":"rem.ote.ip.adr","app":"OC_USER_SQL","message":"Loaded settings for domain: oc.domain.net","level":0,"time":"September 01, 2016 15:39:08","method":"GET","url":"/cron.php","user":"--"} {"reqId":"yeZ1cAmm68BeSLed3Ijn","remoteAddr":"rem.ote.ip.adr","app":"no app in context","message":"Invalidating tokens older than 2016-08-31T13:39:08+00:00","level":1,"time":"September 01, 2016 15:39:08","method":"GET","url":"/cron.php","user":"--"}
Thanks for the logs. Could you try clearing your browser cache and cookies and logging in again? Did you check from a different computer?
At first, it has authenticated you correctly, but the next request fails with "Login failed". What server environment do you use (PHP version, webserver, ...)?
i have now noticed that the users got copied from the external sql database to the oc_users table (probably by some broken owncloud upgrade in the past). the principal admin acount never was on user_sql and could always log in. with this admin account in "users" i activated "show user backend" — all relevant accounts had "database" written there, instead of SQL.
i deleted all SQL based users from oc_users manually. now things seem to work as expected.
sorry for bothering you!
regards
-till