Exemplo n.º 1
0
def testPyad():
    rows = getListByDate('2008-02-01')
    for usuario in rows:
        user = pyad.from_cn(usuario)
        print type(user)
        print user
        raw_input("Pulse para continuar ...")
    print len(rows)
Exemplo n.º 2
0
def add_to_group(username, password, server, groupdn, cn):
    from pyad import pyad
    pyad.set_defaults(ldap_server=server,
                      username=username, password=password)
    group = pyad.from_dn(groupdn)
    user = pyad.from_cn(cn)
    group.add_members([user])
    print "Moved " + user + "to " + group
Exemplo n.º 3
0
def testPyad():
    rows = getListByDate('2008-02-01')
    for usuario in rows:
        user = pyad.from_cn(usuario)
        print type(user)
        print user
        raw_input("Pulse para continuar ...")
    print len(rows)