X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=blobdiff_plain;f=ud-passchk;h=1364e523f04b990e499851a152e625807e6044e4;hp=e7c3cb79eef4c690886e678c74593dd96b5949c4;hb=HEAD;hpb=836c37b9ee287a5934e9d42b8eee5bfa632c560b diff --git a/ud-passchk b/ud-passchk index e7c3cb7..1364e52 100755 --- a/ud-passchk +++ b/ud-passchk @@ -2,7 +2,7 @@ # -*- 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): @@ -23,7 +23,7 @@ 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; @@ -41,7 +41,7 @@ def PassCheck(l,File,HomePrefix): 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]);