You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
425 B
30 lines
425 B
1 year ago
|
#!/bin/bash
|
||
|
|
||
|
ENGINE=$1
|
||
|
|
||
|
function gost
|
||
|
{
|
||
|
sed -i 's/sha512/gost_yescrypt/' /etc/pam.d/system-auth
|
||
|
sed -i 's/sha512/gost_yescrypt/' /etc/pam.d/password-auth
|
||
|
|
||
|
}
|
||
|
|
||
|
function default
|
||
|
{
|
||
|
sed -i 's/gost_yescrypt/sha512/' /etc/pam.d/system-auth
|
||
|
sed -i 's/gost_yescrypt/sha512/' /etc/pam.d/password-auth
|
||
|
}
|
||
|
|
||
|
case ${ENGINE} in
|
||
|
"gost")
|
||
|
gost
|
||
|
;;
|
||
|
|
||
|
"default")
|
||
|
default
|
||
|
;;
|
||
|
*)
|
||
|
printf "Must be gost or default\n"
|
||
|
;;
|
||
|
esac
|