mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-27 06:22:18 +03:00
ldap sssd libsss-sudo, bash changes, ahenk post install sssd_ad_authentication
This commit is contained in:
parent
24d425d27f
commit
1f96586b8c
8 changed files with 32 additions and 26 deletions
9
debian/ahenk.postinst
vendored
9
debian/ahenk.postinst
vendored
|
@ -5,10 +5,15 @@ set -e
|
|||
#mkdir -p /usr/share/ahenk/plugins
|
||||
|
||||
# update ahenk from 1.0.0-6 to 1.0.0-7
|
||||
if [ ! -d /etc/ahenk ]; then
|
||||
|
||||
if [[ ! -d /etc/ahenk ]]; then
|
||||
mkdir -p /etc/ahenk
|
||||
cp -rf /tmp/ahenk/* /etc/ahenk
|
||||
# update pardus21 sssd conf changes when update pardus from 24 to 25
|
||||
if [[ -f /etc/ahenk/ad_info ]]; then
|
||||
if [[ -f /etc/sssd/sssd.conf ]]; then
|
||||
sed -i 's/ad_domain/ad_server/g' /etc/sssd/sssd.conf
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
systemctl enable ahenk
|
||||
|
|
4
debian/ahenk.postinst.debhelper
vendored
4
debian/ahenk.postinst.debhelper
vendored
|
@ -6,8 +6,8 @@ fi
|
|||
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installinit
|
||||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
|
||||
if [ -x "/etc/init.d/ahenk" ]; then
|
||||
if [[ "$1" = "configure" ]] || [[ "$1" = "abort-upgrade" ]]; then
|
||||
if [[ -x "/etc/init.d/ahenk" ]]; then
|
||||
update-rc.d ahenk defaults >/dev/null
|
||||
invoke-rc.d ahenk start || exit $?
|
||||
fi
|
||||
|
|
2
debian/ahenk.postrm
vendored
2
debian/ahenk.postrm
vendored
|
@ -2,6 +2,6 @@
|
|||
|
||||
set -e
|
||||
|
||||
if [ -d /etc/ahenk ] && [ "$1" = "purge" ];then
|
||||
if [[ -d /etc/ahenk ]] && [[ "$1" = "purge" ]];then
|
||||
rm -rf /etc/ahenk
|
||||
fi
|
||||
|
|
4
debian/ahenk.postrm.debhelper
vendored
4
debian/ahenk.postrm.debhelper
vendored
|
@ -1,12 +1,12 @@
|
|||
# Automatically added by dh_installinit
|
||||
if [ "$1" = "purge" ] ; then
|
||||
if [[ "$1" = "purge" ]] ; then
|
||||
update-rc.d ahenk remove >/dev/null
|
||||
fi
|
||||
|
||||
|
||||
# In case this system is running systemd, we make systemd reload the unit files
|
||||
# to pick up changes.
|
||||
if [ -d /run/systemd/system ] ; then
|
||||
if [[ -d /run/systemd/system ]] ; then
|
||||
systemctl --system daemon-reload >/dev/null || true
|
||||
fi
|
||||
# End automatically added section
|
||||
|
|
2
debian/ahenk.preinst
vendored
2
debian/ahenk.preinst
vendored
|
@ -4,7 +4,7 @@ set -e
|
|||
|
||||
# Create necessary directories
|
||||
#update ahenk from 1.0.0-6 to 1.0.0-7
|
||||
if [ -d /etc/ahenk ]; then
|
||||
if [[ -d /etc/ahenk ]]; then
|
||||
|
||||
cp -rf /etc/ahenk /tmp
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ class CommandRunner(object):
|
|||
|
||||
if str(json_data['event']) == 'login' and self.check_last_login():
|
||||
username = json_data['username']
|
||||
if username != "Debian-gdm" or username != "gdm":
|
||||
if username != "Debian-gdm" and username != "gdm":
|
||||
display = json_data['display']
|
||||
desktop = json_data['desktop']
|
||||
|
||||
|
@ -163,6 +163,7 @@ class CommandRunner(object):
|
|||
|
||||
elif str(json_data['event']) == 'logout':
|
||||
username = json_data['username']
|
||||
if username != "Debian-gdm" and username != "gdm":
|
||||
self.execute_manager.remove_user_executed_policy_dict(username)
|
||||
self.plugin_manager.process_mode('logout', username)
|
||||
self.plugin_manager.process_mode('safe', username)
|
||||
|
|
|
@ -16,7 +16,7 @@ class ExecuteCancelLDAPLogin:
|
|||
def cancel(self):
|
||||
self.logger.info('Purge ldap packages')
|
||||
self.util.execute("apt-get install sudo -y")
|
||||
self.util.execute("apt purge libpam-ldap libnss-ldap ldap-utils sudo-ldap nss-updatedb libnss-db libpam-ccreds -y")
|
||||
self.util.execute("apt purge libpam-ldap libnss-ldap ldap-utils sudo-ldap nss-updatedb libnss-db libpam-ccreds libsss-sudo -y")
|
||||
self.util.execute("apt autoremove -y")
|
||||
|
||||
self.logger.info('purging successfull')
|
||||
|
|
|
@ -178,7 +178,7 @@ class ExecuteLDAPLogin:
|
|||
self.util.write_file(libnss_ldap_file_path, content, 'a+')
|
||||
self.logger.info("Configuration has been made to {0}.".format(libnss_ldap_file_path))
|
||||
|
||||
result_code, p_out, p_err = self.util.execute("apt-get install libnss-db libpam-ccreds -y")
|
||||
result_code, p_out, p_err = self.util.execute("apt-get install libnss-db libpam-ccreds libsss-sudo -y")
|
||||
if result_code != 0:
|
||||
self.logger.error("Error occured while downloading libnss-db libpam-ccreds.")
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue