Создайте экземпляр sshd только для смены пароля в Linux.Linux

Anonymous
Создайте экземпляр sshd только для смены пароля в Linux.

Сообщение Anonymous »


I need to setup an sshd service on port 2222 where users are just asked for change their passwords and close connection, nothing else.

I have tryed with pam_exec running an script, but i dont know if there is a better way.

Thanks.

in /etc/pam.d/sshd-2222 file i put a sessin required pam_exec.so stdout debug /path_to/chgpass.sh

this script issues a passwd -e $PAM_USER if the user havent had changed the password recently

but im not shure if this is a good way


Источник: https://stackoverflow.com/questions/781 ... d-in-linux

Вернуться в «Linux»