exit(0) parser.set_usage("usage: %s %s username" % (shell_cmd_name,cmd)) (options, args) = parser.parse_args() if len(args)<2: print "Missing username argument" exit(0) username = check_username(args[1]) if not username: print "The given username is invalid." exit(0) am = AccessManager() try: res = am.list_permissions(username) except Exception, e: print e print "An error occured while writing to the user LDAP database" exit(res) if res==-13401: print 'User "%s" does not exist' % username exit(res) if type(res) == list: for perm in res: print perm exit(0) if cmd == "add_access_identifier": if os.getuid()!=0: