hash and salt passwords now
This commit is contained in:
parent
9807874c4e
commit
7bdb07332b
2 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ if(~ $"user_name '' || ~ $"user_pass '')
|
||||||
usage
|
usage
|
||||||
|
|
||||||
mkdir etc/users/$user_name
|
mkdir etc/users/$user_name
|
||||||
echo $user_pass > etc/users/$user_name/password
|
mkpasswd $user_pass > etc/users/$user_name/password
|
||||||
|
|
||||||
if(! ~ $#user_groups 0)
|
if(! ~ $#user_groups 0)
|
||||||
for(g in $user_groups) {
|
for(g in $user_groups) {
|
||||||
|
|
|
@ -70,7 +70,7 @@ fn auth_user {
|
||||||
status=('Auth: missing user name or pass: '^$"user_name^' / '^$"user_password)
|
status=('Auth: missing user name or pass: '^$"user_name^' / '^$"user_password)
|
||||||
if not if(! test -f $pfile)
|
if not if(! test -f $pfile)
|
||||||
status=('Auth: cant find '^$pfile)
|
status=('Auth: cant find '^$pfile)
|
||||||
if not if(! test -s $pfile || ! ~ $user_password `{cat $pfile})
|
if not if(! test -s $pfile || ! ~ $user_password `{cat $pfile} && ! ~ `{mkpasswd -S `{cat $pfile | cut -d'$' -f3} $user_password} `{cat $pfile})
|
||||||
status=('Auth: Pass '$user_password' doesnt match '^`{cat $pfile})
|
status=('Auth: Pass '$user_password' doesnt match '^`{cat $pfile})
|
||||||
if not {
|
if not {
|
||||||
logged_user=$user_name
|
logged_user=$user_name
|
||||||
|
|
Loading…
Reference in a new issue