简体   繁体   中英

Nextcloud 12 password generation

我想从外部生成nextcloud密码,在哪里可以找到用于将密码存储在数据库中的盐和加密方式?

the nextcloud password entry in the database is

1|$2y$10$hDoBSweagiX8g... (I cut it, because it's slightly longer but that isnt intresting)

I dont specifically know what the 1| part is but $2y$ definitely indicates a bcrypt hash with PHP's fixed behavior.

so I just tried making a quick bcrypt hash in an interactive PHP shell

php echo password_hash("password",PASSWORD_BCRYPT);

and entered the new bcrypt string right after the 1| and it worked

To reset the password of a user you can use the user:resetpassword action on the occ command. You can find the documentation on https://docs.nextcloud.com/server/12/admin_manual/configuration_server/occ_command.html#user-commands-label .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM