X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-host;h=97af1ef6e04ae5ecc02598d298d4b3206ca2699c;hb=595923978a9ad55f4ec55b1aabef44683b111911;hp=ebcaa05bc5e35940ae7d34ff52f3e6ca9ebfd0ec;hpb=c16437263020faa76c84a91b383c8d8b45d41d13;p=mirror%2Fuserdir-ldap.git diff --git a/ud-host b/ud-host index ebcaa05..97af1ef 100755 --- a/ud-host +++ b/ud-host @@ -32,7 +32,7 @@ # -l list all hosts and their status # -f list all SSH fingerprints -import string, time, os, pwd, sys, getopt, ldap, crypt, readline, copy; +import time, os, pwd, sys, getopt, ldap, crypt, readline, copy; from tempfile import mktemp from os import O_CREAT, O_EXCL, O_WRONLY from userdir_ldap import *; @@ -170,7 +170,7 @@ def MultiChangeAttr(Attrs,Attr): Attrs[1][Attr].sort(); print "Old values: ",Attrs[1][Attr]; - Mode = string.upper(raw_input("[D]elete or [A]dd? ")); + Mode = raw_input("[D]elete or [A]dd? ").upper() if (Mode != 'D' and Mode != 'A'): return; @@ -241,9 +241,9 @@ for (switch, val) in options: FingerPrints = 1 if (BindUser != ""): - l = passwdAccessLDAP(LDAPServer, BaseDn, BindUser) + l = passwdAccessLDAP(BaseDn, BindUser) else: - l = ldap.open(LDAPServer); + l = connectLDAP() l.simple_bind_s("","") if ListMode == 1: