Fixes in change_password for users, disabled password change
This commit is contained in:
parent
8e693ae7b6
commit
e4410d0421
3 changed files with 25 additions and 2 deletions
|
|
@ -172,6 +172,27 @@ if linux_distro=='arch':
|
|||
print('Error, cannot add utilities for archlinux')
|
||||
exit(1)
|
||||
|
||||
# Add selinux permisions
|
||||
|
||||
if call("sudo getenforce", shell=True)==0:
|
||||
|
||||
# If selinux enabled, set permissions to /home/hosting/sites for sites.
|
||||
if call("setenforce 0", shell=True) > 0:
|
||||
print('Error, cannot disable selinux...')
|
||||
exit(1)
|
||||
|
||||
#with open('/etc/sysconfig/selinux') as f:
|
||||
|
||||
if linux_distro=='rocky' or linux_distro=='fedora' or linux_distro=='almalinux':
|
||||
|
||||
if call("sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config", shell=True) > 0:
|
||||
print('Error, cannot disable selinux in file /etc/selinux/config...')
|
||||
exit(1)
|
||||
|
||||
if call("sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/sysconfig/selinux", shell=True) > 0:
|
||||
print('Error, cannot disable selinux in file /etc/sysconfig/selinux...')
|
||||
exit(1)
|
||||
|
||||
"""
|
||||
else:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue