Add utility to lock user accounts. Remove lock capability from ipa-deluser

Fix bootstrap.ldif to add new Class of Service entries properly
Include some man pages that weren't being installed
This commit is contained in:
Rob Crittenden
2007-11-26 22:28:53 -05:00
parent 0b1650e7ad
commit ab67029d94
7 changed files with 147 additions and 25 deletions

View File

@@ -34,8 +34,6 @@ def usage():
def parse_options():
parser = OptionParser()
parser.add_option("-d", "--delete", action="store_true", dest="deluser",
help="Delete the user, don't inactivate them.")
parser.add_option("--usage", action="store_true",
help="Program usage")
@@ -50,21 +48,10 @@ def main():
if len(args) != 2:
usage()
msg = "inactivated"
try:
client = ipaclient.IPAClient()
if options.deluser:
ret = client.delete_user(args[1])
msg = "deleted"
else:
try:
ret = client.mark_user_inactive(args[1])
except ipa.ipaerror.exception_for(ipa.ipaerror.LDAP_EMPTY_MODLIST):
print "User is already marked inactive"
return 0
except:
raise
print args[1] + " successfully %s" % msg
ret = client.delete_user(args[1])
print args[1] + " successfully deleted"
except xmlrpclib.Fault, fault:
if fault.faultCode == errno.ECONNREFUSED:
print "The IPA XML-RPC service is not responding."