* Remove unused options from rublon default config * Remove safe|secure options * Allow 9 digits long passcode for passcode bypass * Change name of 'Mobile Passcode' to 'Passcode' * Do not display any prompt when user is waiting * remove unused alloca.h header * Add autopushPrompt option * Change name OTP method * Change enrolement message handling * add static string ctor * Addded postrm script * [bugfix] Restart sshd service after rublon package instalation * Rename 01_rublon_ssh.conf to 01-rublon-ssh.conf * Prepared scripts for generating rpm for alma nad rocky * Adding public key authentication option * Add postinst script and ssh configuration for using pubkey * Add GCC 7 compatybility * Cleanup includes, cleanup std::array usage * Add Static String implementation * Remove memory_resources * Add monotonic_buffer_resource in experimental c++ imlpementation * Use case insensitive map * Remove not needed code
42 lines
1.2 KiB
Bash
42 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
SSHD_CONF=/etc/ssh/sshd_config
|
|
SSHD_PAM_CONF=/etc/pam.d/sshd
|
|
RUBLON_CONFIG=/etc/rublon.config
|
|
RUBLON_SSH_CONFIG=/etc/ssh/sshd_config.d/01-rublon-ssh.conf
|
|
|
|
if [ ! -f $RUBLON_CONFIG ]
|
|
then
|
|
cp -a /usr/share/rublon/rublon.config.defaults $RUBLON_CONFIG
|
|
chown root:root $RUBLON_CONFIG
|
|
chmod 640 $RUBLON_CONFIG
|
|
fi
|
|
cp -a /usr/share/rublon/service/01-rublon-ssh_pubkey.conf.default $RUBLON_SSH_CONFIG
|
|
chown root:root $RUBLON_SSH_CONFIG
|
|
chmod 640 $RUBLON_SSH_CONFIG
|
|
|
|
if [ -f /etc/os-release ]
|
|
then
|
|
. /etc/os-release
|
|
fi
|
|
|
|
#if [[ $ID == "rhel" || $ID=="alma" || $ID=="rocky" ]]
|
|
#then
|
|
# cd /usr/share/rublon/service
|
|
# checkmodule -M -m -o login_rublon.mod login_rublon.te
|
|
# semodule_package -o login_rublon.pp -m login_rublon.mod
|
|
# semodule -i login_rublon.pp
|
|
#fi
|
|
|
|
grep -qe 'auth required pam_rublon.so' $SSHD_PAM_CONF || sed -i '$aauth required pam_rublon.so' $SSHD_PAM_CONF
|
|
grep -qe 'account required pam_rublon.so' $SSHD_PAM_CONF || sed -i '$aaccount required pam_rublon.so' $SSHD_PAM_CONF
|
|
grep -qe '@include common-auth' $SSHD_PAM_CONF || sed -i 's/@include common-auth/#@include common-auth/' $SSHD_PAM_CONF
|
|
|
|
if [[ $ID == "rhel" || $ID=="alma" || $ID=="rocky" ]]
|
|
then
|
|
systemctl restart sshd
|
|
else
|
|
deb-systemd-invoke restart ssh.service
|
|
fi
|
|
|