Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create user #739

Closed
DebenOldert opened this issue Dec 5, 2012 · 25 comments
Closed

Can't create user #739

DebenOldert opened this issue Dec 5, 2012 · 25 comments
Labels

Comments

@DebenOldert
Copy link

When i try to add an user i get an popup that says: can't create user. User already exist.
But the user doesn't exist.

@ako84
Copy link

ako84 commented Dec 17, 2012

i have the same problem. When i create a user a popup apperas with the message "cant create user. User already exists"
i tried different usernames, which dont exist. At the moment my owncloud has 20 users and some groups

there are no errors listed in the owncloud log file and no ones at the apache error log.

i am using owncloud 4.5.4

@DeepDiver1975
Copy link
Member

What do the user names look like?
Any non ascii characters?

@ako84
Copy link

ako84 commented Dec 18, 2012

for example:
username: name
passw: 12345

@DeepDiver1975
Copy link
Member

Any error in the browser's javascript console?
Which browser on which OS are you using? THX

@DebenOldert
Copy link
Author

I fixed it!
I reinstalled windows and reinstalled owncloud.
Everything works fine now.
My OS windows and mac
Both didn't work
I used different browsers ( safari, chrome, internet explorer) and these didn't work too.

Deben Oldert 4V3

Verstuurt vanaf mijn iPhone!

Op 18 dec. 2012 om 10:48 heeft Thomas Müller [email protected] het volgende geschreven:

Any error in the browser's javascript console?
Which browser on which OS are you using? THX


Reply to this email directly or view it on GitHub.

@ako84
Copy link

ako84 commented Dec 18, 2012

i am using Windows7 and Ubuntu
Firefox and IE (actual versions)

entry at java script console (i changed ip adress to 000):
[11:06:46.661] POST https://00.000.00.000/owncloud/settings/ajax/createuser.php [HTTP/1.1 200 OK 93ms]

i dont want to reinstall my owncloud or OS...

@DeepDiver1975
Copy link
Member

@ako84 can you please post the request and the response of that POST? THX

@ako84
Copy link

ako84 commented Dec 18, 2012

Request-URL:
https://00.000.00.000/owncloud/settings/ajax/createuser.php

Request-Methode:
POST

Status-Code:
HTTP/1.1 200 OK

Request-Headers
11:27:46.000

X-Requested-With:XMLHttpRequestUser-Agent:Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0requesttoken:4aa13a8722a784e20448Referer:https://00.000.00.000/owncloud/settings/users.phpPragma:no-cacheHost:00.000.00.000Content-Type:application/x-www-form-urlencoded; charset=UTF-8Content-Length:28Connection:keep-aliveCache-Control:no-cacheAccept-Language:de-de,de;q=0.8,en-us;q=0.5,en;q=0.3Accept-Encoding:gzip, deflateAccept:/

Gesendetes Cookie
PHPSESSID:jda6sc154r907svgefhn4cifp7

Response-Header
Δ109ms

X-Powered-By:PHP/5.4.6-1ubuntu1X-Content-Type-Options:nosniffServer:Apache/2.2.22 (Ubuntu)Pragma:no-cacheKeep-Alive:timeout=5, max=100Expires:Thu, 19 Nov 1981 08:52:00 GMTDate:Tue, 18 Dec 2012 10:27:47 GMTContent-Type:application/jsonContent-Length:59Connection:Keep-AliveCache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0

@DeepDiver1975
Copy link
Member

@ako84 THX a lot! Can you paste the content as well? I'd like to see the json going back and forth. THX

@ako84
Copy link

ako84 commented Dec 18, 2012

how do i get the content?
its all i get from my java console...

@DeepDiver1975
Copy link
Member

with chrome it is possible - no idea about ff

@ako84
Copy link

ako84 commented Dec 18, 2012

hm...sure? i could only see contents at warnings and errors...
but not at normal network requests without errors.

how do you get the content at chrome?
i am not familiar with that

@tanghus
Copy link
Contributor

tanghus commented Dec 18, 2012

In Chrome press F12 to get to Developer tools. Select the Network tab, try to create a user and then click on the entry for createuser.php

@ako84
Copy link

ako84 commented Dec 18, 2012

ok i installed chrome

i have two path to select:
createuser.php
delete.png

createuser.php (i changed the host IP to 00.000...for safety):

Preview:
data: {message:User already exists}
status: "error"

Response:
{"data":{"message":"User already exists"},"status":"error"}

CopyAll as HAR:

{
"log": {
"version": "1.2",
"creator": {
"name": "WebInspector",
"version": "537.4"
},
"pages": [],
"entries": [
{
"startedDateTime": "2012-12-18T21:36:43.490Z",
"time": 55,
"request": {
"method": "POST",
"url": "https://00.000.00.000/owncloud/settings/ajax/createuser.php",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Cookie",
"value": "PHPSESSID=61djq7o5p4g660i3fp3u1vepn6"
},
{
"name": "requesttoken",
"value": "781e7ec0244199045b69"
},
{
"name": "Origin",
"value": "https://00.000.00.000"
},
{
"name": "Accept-Encoding",
"value": "gzip,deflate,sdch"
},
{
"name": "Accept-Language",
"value": "de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4"
},
{
"name": "X-Requested-With",
"value": "XMLHttpRequest"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Content-Length",
"value": "28"
},
{
"name": "Accept-Charset",
"value": "ISO-8859-1,utf-8;q=0.7,;q=0.3"
},
{
"name": "Host",
"value": "00.000.00.000"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.4 (KHTML, like Gecko) Ubuntu/12.10 Chromium/22.0.1229.94 Chrome/22.0.1229.94 Safari/537.4"
},
{
"name": "Content-Type",
"value": "application/x-www-form-urlencoded; charset=UTF-8"
},
{
"name": "Accept",
"value": "
/"
},
{
"name": "Referer",
"value": "https://00.000.00.000/owncloud/settings/users.php"
}
],
"queryString": [],
"cookies": [
{
"name": "PHPSESSID",
"value": "61djq7o5p4g660i3fp3u1vepn6",
"expires": null,
"httpOnly": false,
"secure": false
}
],
"headersSize": 696,
"bodySize": 28,
"postData": {
"mimeType": "application/x-www-form-urlencoded; charset=UTF-8",
"text": "username=name&password=12345",
"params": [
{
"name": "username",
"value": "name"
},
{
"name": "password",
"value": "12345"
}
]
}
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Date",
"value": "Tue, 18 Dec 2012 21:36:43 GMT"
},
{
"name": "X-Content-Type-Options",
"value": "nosniff"
},
{
"name": "X-Powered-By",
"value": "PHP/5.4.6-1ubuntu1"
},
{
"name": "Connection",
"value": "Keep-Alive"
},
{
"name": "Content-Length",
"value": "59"
},
{
"name": "Pragma",
"value": "no-cache"
},
{
"name": "Server",
"value": "Apache/2.2.22 (Ubuntu)"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Cache-Control",
"value": "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
},
{
"name": "Keep-Alive",
"value": "timeout=5, max=100"
},
{
"name": "Expires",
"value": "Thu, 19 Nov 1981 08:52:00 GMT"
}
],
"cookies": [],
"content": {
"size": 59,
"mimeType": "application/json",
"compression": -95
},
"redirectURL": "",
"headersSize": 400,
"bodySize": 154
},
"cache": {},
"timings": {
"blocked": 0,
"dns": -1,
"connect": 8,
"send": -3,
"wait": 34,
"receive": 3,
"ssl": 4
}
},
{
"startedDateTime": "2012-12-18T21:36:43.660Z",
"time": 30,
"request": {
"method": "GET",
"url": "https://00.000.00.000/owncloud/core/img/actions/delete.png?2012-12-06T13:10:00Z",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Accept-Encoding",
"value": "gzip,deflate,sdch"
},
{
"name": "Accept-Language",
"value": "de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4"
},
{
"name": "Cookie",
"value": "PHPSESSID=61djq7o5p4g660i3fp3u1vepn6"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Accept-Charset",
"value": "ISO-8859-1,utf-8;q=0.7,
;q=0.3"
},
{
"name": "Host",
"value": "00.000.00.000"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.4 (KHTML, like Gecko) Ubuntu/12.10 Chromium/22.0.1229.94 Chrome/22.0.1229.94 Safari/537.4"
},
{
"name": "Accept",
"value": "/"
},
{
"name": "Referer",
"value": "https://00.000.00.000/owncloud/settings/users.php"
}
],
"queryString": [
{
"name": "2012-12-06T13:10:00Z",
"value": ""
}
],
"cookies": [
{
"name": "PHPSESSID",
"value": "61djq7o5p4g660i3fp3u1vepn6",
"expires": null,
"httpOnly": false,
"secure": false
}
],
"headersSize": 530,
"bodySize": 0
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Date",
"value": "Tue, 18 Dec 2012 21:36:43 GMT"
},
{
"name": "Connection",
"value": "Keep-Alive"
},
{
"name": "Content-Length",
"value": "240"
},
{
"name": "Last-Modified",
"value": "Thu, 06 Dec 2012 13:10:39 GMT"
},
{
"name": "Server",
"value": "Apache/2.2.22 (Ubuntu)"
},
{
"name": "ETag",
"value": ""180c4e-f0-4d02ed357146f""
},
{
"name": "Content-Type",
"value": "image/png"
},
{
"name": "Accept-Ranges",
"value": "bytes"
},
{
"name": "Keep-Alive",
"value": "timeout=5, max=99"
}
],
"cookies": [],
"content": {
"size": 240,
"mimeType": "image/png",
"compression": -104
},
"redirectURL": "",
"headersSize": 290,
"bodySize": 344
},
"cache": {},
"timings": {
"blocked": 0,
"dns": -1,
"connect": -1,
"send": 1,
"wait": 4,
"receive": 24,
"ssl": -1
}
}
]
}
}



delete.png(i changed the host IP to 00.000...for safety:

{
"log": {
"version": "1.2",
"creator": {
"name": "WebInspector",
"version": "537.4"
},
"pages": [],
"entries": [
{
"startedDateTime": "2012-12-18T21:36:43.490Z",
"time": 55,
"request": {
"method": "POST",
"url": "https://00.000.00.000/owncloud/settings/ajax/createuser.php",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Cookie",
"value": "PHPSESSID=61djq7o5p4g660i3fp3u1vepn6"
},
{
"name": "requesttoken",
"value": "781e7ec0244199045b69"
},
{
"name": "Origin",
"value": "https://00.000.00.000"
},
{
"name": "Accept-Encoding",
"value": "gzip,deflate,sdch"
},
{
"name": "Accept-Language",
"value": "de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4"
},
{
"name": "X-Requested-With",
"value": "XMLHttpRequest"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Content-Length",
"value": "28"
},
{
"name": "Accept-Charset",
"value": "ISO-8859-1,utf-8;q=0.7,;q=0.3"
},
{
"name": "Host",
"value": "00.000.00.000"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.4 (KHTML, like Gecko) Ubuntu/12.10 Chromium/22.0.1229.94 Chrome/22.0.1229.94 Safari/537.4"
},
{
"name": "Content-Type",
"value": "application/x-www-form-urlencoded; charset=UTF-8"
},
{
"name": "Accept",
"value": "
/"
},
{
"name": "Referer",
"value": "https://00.000.00.000/owncloud/settings/users.php"
}
],
"queryString": [],
"cookies": [
{
"name": "PHPSESSID",
"value": "61djq7o5p4g660i3fp3u1vepn6",
"expires": null,
"httpOnly": false,
"secure": false
}
],
"headersSize": 696,
"bodySize": 28,
"postData": {
"mimeType": "application/x-www-form-urlencoded; charset=UTF-8",
"text": "username=name&password=12345",
"params": [
{
"name": "username",
"value": "name"
},
{
"name": "password",
"value": "12345"
}
]
}
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Date",
"value": "Tue, 18 Dec 2012 21:36:43 GMT"
},
{
"name": "X-Content-Type-Options",
"value": "nosniff"
},
{
"name": "X-Powered-By",
"value": "PHP/5.4.6-1ubuntu1"
},
{
"name": "Connection",
"value": "Keep-Alive"
},
{
"name": "Content-Length",
"value": "59"
},
{
"name": "Pragma",
"value": "no-cache"
},
{
"name": "Server",
"value": "Apache/2.2.22 (Ubuntu)"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Cache-Control",
"value": "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
},
{
"name": "Keep-Alive",
"value": "timeout=5, max=100"
},
{
"name": "Expires",
"value": "Thu, 19 Nov 1981 08:52:00 GMT"
}
],
"cookies": [],
"content": {
"size": 59,
"mimeType": "application/json",
"compression": -95
},
"redirectURL": "",
"headersSize": 400,
"bodySize": 154
},
"cache": {},
"timings": {
"blocked": 0,
"dns": -1,
"connect": 8,
"send": -3,
"wait": 34,
"receive": 3,
"ssl": 4
}
},
{
"startedDateTime": "2012-12-18T21:36:43.660Z",
"time": 30,
"request": {
"method": "GET",
"url": "https://00.000.00.000/owncloud/core/img/actions/delete.png?2012-12-06T13:10:00Z",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Accept-Encoding",
"value": "gzip,deflate,sdch"
},
{
"name": "Accept-Language",
"value": "de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4"
},
{
"name": "Cookie",
"value": "PHPSESSID=61djq7o5p4g660i3fp3u1vepn6"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Accept-Charset",
"value": "ISO-8859-1,utf-8;q=0.7,
;q=0.3"
},
{
"name": "Host",
"value": "00.000.00.000"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.4 (KHTML, like Gecko) Ubuntu/12.10 Chromium/22.0.1229.94 Chrome/22.0.1229.94 Safari/537.4"
},
{
"name": "Accept",
"value": "/"
},
{
"name": "Referer",
"value": "https://00.000.00.000/owncloud/settings/users.php"
}
],
"queryString": [
{
"name": "2012-12-06T13:10:00Z",
"value": ""
}
],
"cookies": [
{
"name": "PHPSESSID",
"value": "61djq7o5p4g660i3fp3u1vepn6",
"expires": null,
"httpOnly": false,
"secure": false
}
],
"headersSize": 530,
"bodySize": 0
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Date",
"value": "Tue, 18 Dec 2012 21:36:43 GMT"
},
{
"name": "Connection",
"value": "Keep-Alive"
},
{
"name": "Content-Length",
"value": "240"
},
{
"name": "Last-Modified",
"value": "Thu, 06 Dec 2012 13:10:39 GMT"
},
{
"name": "Server",
"value": "Apache/2.2.22 (Ubuntu)"
},
{
"name": "ETag",
"value": ""180c4e-f0-4d02ed357146f""
},
{
"name": "Content-Type",
"value": "image/png"
},
{
"name": "Accept-Ranges",
"value": "bytes"
},
{
"name": "Keep-Alive",
"value": "timeout=5, max=99"
}
],
"cookies": [],
"content": {
"size": 240,
"mimeType": "image/png",
"compression": -104
},
"redirectURL": "",
"headersSize": 290,
"bodySize": 344
},
"cache": {},
"timings": {
"blocked": 0,
"dns": -1,
"connect": -1,
"send": 1,
"wait": 4,
"receive": 24,
"ssl": -1
}
}
]
}
}

@ako84
Copy link

ako84 commented Dec 19, 2012

one more info:

it seems, i configurated my owncloud using SQLite not MySQL during install. I opened owncloud.db from the data directory. The database contains only the 20 existing users.
i have access to the data directory only as root. i hope this is correct...

@slonkak
Copy link

slonkak commented Dec 19, 2012

I have the same problem. I recently updated my install from 4.5.3 to 4.5.4 following the procedure on owncloud's site. Before hitting the URL again I copied back the config.php file and everything instantly worked. I was able to add users. Now, all of a sudden, I can no longer add users with the same error as the OP. I am using MySQL as the backend and have 23 users.

I've read that people have deleted config.php and let owncloud regenerate it, but I'm afraid of doing that in case it tries to wipe my data dir (which contains TBs of data) or wipe my user accounts. If someone can guarantee that deleting config.php and re-setting up owncloud will not destroy any existing data I'll do that and see if it helps.

@ako84
Copy link

ako84 commented Dec 19, 2012

hi

i deleted config.php and regenerated it. After that, a white screen appears if i logged in...
Now i copy back my backup.

Befor updating my owncloud from 4.5.3 to 4.5.4 adding new users works fine...

@RandolfCarter
Copy link
Contributor

As stated in #1209 already: This is most probably a problem with an authentication app (e.g. webdavauth) being enabled - when the user backend can't search for a user (only authenticate it), these apps return "exists" for every username, therefore preventing creation - what would be nice would be a more fitting message (e.g. "User backend xyz prevents creation of new users").

@karlitschek
Copy link
Contributor

@DeepDiver1975 Is this fixed with you latest changes?

@ako84
Copy link

ako84 commented Feb 9, 2013

no, i still cant create users. Only directly in the MySQL database...

EDIT: i can create users, if webdav user backend is disabled! (like RandolfCarter wrote above)

@DeepDiver1975
Copy link
Member

no yet - blocked by another pr at the moment

@DeepDiver1975
Copy link
Member

@DebenOldert @ako84 Does this problem persist with the latest 4.5.7? THX

@ako84
Copy link

ako84 commented Mar 7, 2013

yes, the problem still persists. But only with enabled webdav user backend.

@DeepDiver1975
Copy link
Member

Okay - this is an acceptable solution to the issue.
It has been fixed with OC5
The required change to make it work in 4.5.x would possible break to much -> closing.

THX a lot!

@zeigerpuppy
Copy link

Looks like this bug is back on 6.0.3. I have enabled IMAP logins using the following code in config.php.
IMAP user logins work fine but when I try to create a normal owncloud user, it fails with the error:
"Can't create user. User already exists."

It's pretty clear that this is replacing rather than augmenting the user backend. Is there a way to use both backends?
Is installing the plugin at https://github.com/DSI-Universite-Rennes2/user_imap a better way to achieve IMAP logins?

require_once(dirname(__FILE__).'/../apps/user_external/lib/imap.php');
...
"user_backends" => array (
    0 => array (
            "class"     => "OC_User_IMAP",
            "arguments" => array (
                              0 => '{mail.localnet/novalidate-cert:143}'
                              ),
    ),
),

@lock lock bot locked as resolved and limited conversation to collaborators Aug 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants