summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrcrit <rcrit@tove.greyoak.com>2010-03-15 13:41:07 -0400
committerJason Gerard DeRose <jderose@redhat.com>2010-03-19 07:58:47 -0600
commita887922fa97a43c31139dcd4159dfbee0f9c2093 (patch)
treea816c6be7b373b98bb4648087713a1a05764f0d9
parent3998078461f9e8484e91449f895e6a444b6f6245 (diff)
downloadfreeipa-a887922fa97a43c31139dcd4159dfbee0f9c2093.tar.gz
freeipa-a887922fa97a43c31139dcd4159dfbee0f9c2093.tar.xz
freeipa-a887922fa97a43c31139dcd4159dfbee0f9c2093.zip
Add option to enable pam_mkhomedirs in the IPA client installer
-rw-r--r--ipa-client/ipa-install/ipa-client-install17
-rw-r--r--ipa-client/man/ipa-client-install.13
2 files changed, 15 insertions, 5 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index 066c5adbd..9e66e786b 100644
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -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:
diff --git a/ipa-client/man/ipa-client-install.1 b/ipa-client/man/ipa-client-install.1
index d5efb63bb..9eb0b39d9 100644
--- a/ipa-client/man/ipa-client-install.1
+++ b/ipa-client/man/ipa-client-install.1
@@ -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"