mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 08:00:02 -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)
|
||||
parser.add_option("--permit", dest="permit", action="store_true",
|
||||
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",
|
||||
default=False, help="uninstall an existing installation")
|
||||
|
||||
@ -134,7 +136,7 @@ def uninstall(options):
|
||||
|
||||
print "Disabling client Kerberos and Ldap configurations"
|
||||
try:
|
||||
run(["/usr/sbin/authconfig", "--disableldap", "--disablekrb5", "--disablesssd", "--disablesssdauth", "--update"])
|
||||
run(["/usr/sbin/authconfig", "--disableldap", "--disablekrb5", "--disablesssd", "--disablesssdauth", "--disablemkhomedir", "--update"])
|
||||
except Exception, e:
|
||||
print "Failed to remove krb5/ldap configuration. " +str(e)
|
||||
sys.exit(1)
|
||||
@ -522,11 +524,16 @@ def main():
|
||||
|
||||
# Modify nsswitch/pam stack
|
||||
if options.sssd:
|
||||
run(["/usr/sbin/authconfig", "--enablesssd", "--enablesssdauth", "--update"])
|
||||
print "SSSD enabled"
|
||||
cmd = ["/usr/sbin/authconfig", "--enablesssd", "--enablesssdauth", "--update"]
|
||||
message = "SSSD enabled"
|
||||
else:
|
||||
run(["/usr/sbin/authconfig", "--enableldap", "--update"])
|
||||
print "LDAP enabled"
|
||||
cmd = ["/usr/sbin/authconfig", "--enableldap", "--update"]
|
||||
message = "LDAP enabled"
|
||||
|
||||
if options.mkhomedir:
|
||||
cmd.append("--enablemkhomedir")
|
||||
run(cmd)
|
||||
print message
|
||||
|
||||
#Check nss_ldap is working properly
|
||||
if not options.on_master:
|
||||
|
@ -68,6 +68,9 @@ Principal to use to join the IPA realm.
|
||||
\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.
|
||||
.TP
|
||||
\fB\-\-mkhomedir\fR
|
||||
Create a users home directory if it does not exist.
|
||||
.TP
|
||||
\fB\-\-uninstall\fR
|
||||
Remove the IPA client software and restore the configuration to the pre-IPA state.
|
||||
.SH "EXIT STATUS"
|
||||
|
Loading…
Reference in New Issue
Block a user