Closed hamstar closed 12 years ago
I have done some research on how this can be done. We need to use a crypt command to encrypt a plaintext password and specify it at the point of user creation or using passwd --stdin
.
Since openssl will be installed anyway we can use the command openssl passwd PASSWORD
to encrypt passwords.
Has this been completed? I had a look at the commit https://github.com/hamstar/Braincase/commit/0d3a9daa74219258b7b73f8c2815a4e90bf08ff3, But I didn't see anything relevant.
Yes its currently in the dokumailhalt branch (see user.rb or b72b360f) but I haven't noted it here yet because it needs to be properly tested before being merged into the sprint3 (or sprint4) branch. I will reference this issue when that branch is merged into the main one.
Could be tested like this:
$ irb
irb> require 'usr/share/braincase/lib/braincase/user'
irb> require 'usr/share/braincase/lib/braincase/utils'
irb> u = Braincase::User.new "test"
irb> u.set_password "my password"
irb> exit
$ su test
Password: <enter new password>
If it logs in OK then it worked :)
This currently does not happen. It should be implemented in the user sync script and be set the same as the password specified in the email that is sent to the user.
We will need to consider how #244 works in this context as the dokuwiki password can be gained from there.