# -*- mode: python -*-
# Checks the passwd file to make sure all entries are in the directory
-import string, ldap, getopt, sys, os;
+import ldap, getopt, sys, os;
from userdir_ldap import *;
def PassCheck(l,File,HomePrefix):
if Line == "":
break;
- Split = string.split(Line,":");
+ Split = Line.split(":")
if UIDMap.has_key(Split[0]) == 0:
print Line,
continue;
print "mismatch",Split[0],Miss;
# Connect to the ldap server
-l = ldap.open(LDAPServer);
+l = connectLDAP()
l.simple_bind_s("","");
PassCheck(l,sys.argv[1],sys.argv[2]);