rublon-ssh/service/helpers/postinst_rhel_8
rublon-bwi 2c134435e8
Bwi/v2.0.4 (#12)
* Allow 9 digits long passcode for passcode bypass

* Change name of 'Mobile Passcode' to 'Passcode'

* Do not display any prompt when user is waiting

* Add autopushPrompt option

* Change name OTP method

* Change enrolement message handling

* 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

* Stop using deprecated SHA256 functions

* Changed app verstion to v2.0.4

* Fixed postinst script for ubuntu

* CHanged vangrantfile not to show gui

* Refactor cpack + add component builds for rpm based distros
2024-10-23 11:02:49 +02:00

31 lines
990 B
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/01-rublon-ssh.conf
if [ ! -f /etc/rublon.config ]
then
cp -a /usr/share/rublon/rublon.config.defaults $RUBLON_CONFIG
chown root:root $RUBLON_CONFIG
chmod 640 $RUBLON_CONFIG
fi
if [ ! -f $RUBLON_SSH_CONFIG ]
then
cp -a /usr/share/rublon/01-rublon-ssh.conf.default /etc/ssh/01-rublon-ssh.conf
chown root:root $RUBLON_SSH_CONFIG
chmod 640 $RUBLON_SSH_CONFIG
fi
cd /usr/share/rublon
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
sed -i '1 i\Include /etc/ssh/01-rublon-ssh.conf' $SSHD_CONF
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
systemctl restart sshd