def main(): """Main function. """ args = parseargs() myldap = LdapUtil(args) if args.groups: groups = myldap.getgroups() for group in groups: print 'group[%s] = %s'% (group, groups[group]) elif args.add: myldap.adduser(filename = args.filename, localgid = args.group) elif args.delete: myldap.deluser(args.filename)
def main(): """Main function. """ args = parseargs() myldap = LdapUtil(args.uri , args.basedn, args.basep, args.baseg, args.binddn, args.passwd, args.verbose, args.test) if args.groups: groups = myldap.getgroups() for group in groups: print 'group[%s] = %s'% (group, groups[group]) elif args.add: myldap.adduser(filename = args.filename, localgid = args.group) elif args.delete: myldap.deluser(args.filename)