chore: update readme about hashed password
This commit is contained in:
parent
835438fc2a
commit
f27f9e997f
1 changed files with 7 additions and 3 deletions
10
README.md
10
README.md
|
@ -252,16 +252,20 @@ DUFS supports the use of sha-512 hashed password.
|
||||||
|
|
||||||
Create hashed password
|
Create hashed password
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ mkpasswd -m sha-512 123456
|
$ openssl passwd -6 123456 # or `mkpasswd -m sha-512 123456`
|
||||||
$6$tWMB51u6Kb2ui3wd$5gVHP92V9kZcMwQeKTjyTRgySsYJu471Jb1I6iHQ8iZ6s07GgCIO69KcPBRuwPE5tDq05xMAzye0NxVKuJdYs/
|
$6$tWMB51u6Kb2ui3wd$5gVHP92V9kZcMwQeKTjyTRgySsYJu471Jb1I6iHQ8iZ6s07GgCIO69KcPBRuwPE5tDq05xMAzye0NxVKuJdYs/
|
||||||
```
|
```
|
||||||
|
|
||||||
Use hashed password
|
Use hashed password
|
||||||
```
|
```sh
|
||||||
|
dufs -a "admin:$(openssl passwd -6 123456)@/:rw"
|
||||||
|
dufs -a "admin:$(mkpasswd -m sha-512 123456)@/:rw"
|
||||||
dufs -a 'admin:$6$tWMB51u6Kb2ui3wd$5gVHP92V9kZcMwQeKTjyTRgySsYJu471Jb1I6iHQ8iZ6s07GgCIO69KcPBRuwPE5tDq05xMAzye0NxVKuJdYs/@/:rw'
|
dufs -a 'admin:$6$tWMB51u6Kb2ui3wd$5gVHP92V9kZcMwQeKTjyTRgySsYJu471Jb1I6iHQ8iZ6s07GgCIO69KcPBRuwPE5tDq05xMAzye0NxVKuJdYs/@/:rw'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> The hashed password contains `$6`, which can expand to a variable in some shells, so you have to use **single quotes** to wrap it.
|
||||||
|
|
||||||
Two important things for hashed passwords:
|
Two important things for hashed passwords:
|
||||||
|
|
||||||
1. Dufs only supports sha-512 hashed passwords, so ensure that the password string always starts with `$6$`.
|
1. Dufs only supports sha-512 hashed passwords, so ensure that the password string always starts with `$6$`.
|
||||||
|
|
Loading…
Reference in a new issue