Set password hash

user_management
9.0.x

#1

Hi,
I would like to use an existing bcrypt password hash for an existing user in ownCloud. Is there any recommended way to manage this? Using the Provisioning API I can only set the password in clear text. However, I don't have the password in clear text.

The password hash looks like this one: $2y$10$.vGA1O9wmRjrwAVXD98HNOgsNpDczlqm3Jq7KnEd1rVAGv3Fykk1a


#2

You can't do it via OwnCloud. You can set the hash in the database directly. The hash is stored in the table oc_users.


#3

Thanks for your reply and sorry for my late answer. I know that owncloud stores the password hash already as bcrypt hash in the database. Replacing this password hash with my password hash works fine but I am looking for a solution without touching the database directly.


#4

Hm, I think: No chance.


#5

Could there be any side effects by replacing the password hash in the database? Of course with data encryption disabled.


#6

I've done that in the past - no side effects.


#7

Not really, though it is not a very nice solution. If you want a less hacky solution, you could try to authenticate all services against LDAP or another service (IMAP, ...).


#8

Thanks! I'll take a look at that.