X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=blobdiff_plain;f=ud-groupadd;h=13f1b8a49a4bca863851fdc3e37a19b2e6877a98;hp=6139556470c83414eb0b58bee00e065b59262f1d;hb=9e1e7b0639b1265bf39acd330122f40123451c56;hpb=f4a76efad948fdf652f86095b43e11caf746352f diff --git a/ud-groupadd b/ud-groupadd index 6139556..13f1b8a 100755 --- a/ud-groupadd +++ b/ud-groupadd @@ -1,8 +1,9 @@ #!/usr/bin/env python # -*- mode: python -*- -# Copyright (c) 2000 Jason Gunthorpe +# Copyright (c) 2000 Jason Gunthorpe # Copyright (c) 2001-2003 James Troup +# Copyright (c) 2004 Joey Schulze # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -52,13 +53,7 @@ for (switch, val) in options: if (switch == '-u'): AdminUser = val; -print "Accessing LDAP directory as '" + AdminUser + "'"; -Password = getpass(AdminUser + "'s password: "); - -# Connect to the ldap server -l = ldap.open(LDAPServer); -UserDn = "uid=" + AdminUser + "," + BaseDn; -l.simple_bind_s(UserDn,Password); +l = passwdAccessLDAP(LDAPServer, BaseDn, AdminUser) while 1: Group = raw_input("Group name? ");