mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Add option to enable pam_mkhomedirs in the IPA client installer
This commit is contained in:
parent
3998078461
commit
a887922fa9
@ -74,6 +74,8 @@ def parse_options():
|
|||||||
help="use this option when run on a master", default=False)
|
help="use this option when run on a master", default=False)
|
||||||
parser.add_option("--permit", dest="permit", action="store_true",
|
parser.add_option("--permit", dest="permit", action="store_true",
|
||||||
help="disable access rules by default, permit all access.", default=False)
|
help="disable access rules by default, permit all access.", default=False)
|
||||||
|
parser.add_option("--mkhomedir", dest="mkhomedir", action="store_true",
|
||||||
|
help="create home directories for users on their first login", default=False)
|
||||||
parser.add_option("", "--uninstall", dest="uninstall", action="store_true",
|
parser.add_option("", "--uninstall", dest="uninstall", action="store_true",
|
||||||
default=False, help="uninstall an existing installation")
|
default=False, help="uninstall an existing installation")
|
||||||
|
|
||||||
@ -134,7 +136,7 @@ def uninstall(options):
|
|||||||
|
|
||||||
print "Disabling client Kerberos and Ldap configurations"
|
print "Disabling client Kerberos and Ldap configurations"
|
||||||
try:
|
try:
|
||||||
run(["/usr/sbin/authconfig", "--disableldap", "--disablekrb5", "--disablesssd", "--disablesssdauth", "--update"])
|
run(["/usr/sbin/authconfig", "--disableldap", "--disablekrb5", "--disablesssd", "--disablesssdauth", "--disablemkhomedir", "--update"])
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print "Failed to remove krb5/ldap configuration. " +str(e)
|
print "Failed to remove krb5/ldap configuration. " +str(e)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -522,11 +524,16 @@ def main():
|
|||||||
|
|
||||||
# Modify nsswitch/pam stack
|
# Modify nsswitch/pam stack
|
||||||
if options.sssd:
|
if options.sssd:
|
||||||
run(["/usr/sbin/authconfig", "--enablesssd", "--enablesssdauth", "--update"])
|
cmd = ["/usr/sbin/authconfig", "--enablesssd", "--enablesssdauth", "--update"]
|
||||||
print "SSSD enabled"
|
message = "SSSD enabled"
|
||||||
else:
|
else:
|
||||||
run(["/usr/sbin/authconfig", "--enableldap", "--update"])
|
cmd = ["/usr/sbin/authconfig", "--enableldap", "--update"]
|
||||||
print "LDAP enabled"
|
message = "LDAP enabled"
|
||||||
|
|
||||||
|
if options.mkhomedir:
|
||||||
|
cmd.append("--enablemkhomedir")
|
||||||
|
run(cmd)
|
||||||
|
print message
|
||||||
|
|
||||||
#Check nss_ldap is working properly
|
#Check nss_ldap is working properly
|
||||||
if not options.on_master:
|
if not options.on_master:
|
||||||
|
@ -68,6 +68,9 @@ Principal to use to join the IPA realm.
|
|||||||
\fB\-\-permit\fR
|
\fB\-\-permit\fR
|
||||||
Set the SSSD access rules to permit all access. Otherwise the machine will be controlled by the Host-based Access Controls on the IPA server.
|
Set the SSSD access rules to permit all access. Otherwise the machine will be controlled by the Host-based Access Controls on the IPA server.
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-\-mkhomedir\fR
|
||||||
|
Create a users home directory if it does not exist.
|
||||||
|
.TP
|
||||||
\fB\-\-uninstall\fR
|
\fB\-\-uninstall\fR
|
||||||
Remove the IPA client software and restore the configuration to the pre-IPA state.
|
Remove the IPA client software and restore the configuration to the pre-IPA state.
|
||||||
.SH "EXIT STATUS"
|
.SH "EXIT STATUS"
|
||||||
|
Loading…
Reference in New Issue
Block a user