# -*- mode: python -*-
# Generates passwd, shadow and group files from the ldap directory.
-import string, re, time, ldap, getopt, sys, os, pwd, posix;
+import string, re, time, ldap, getopt, sys, os, pwd, posix, socket;
from userdir_ldap import *;
PasswdAttrs = None;
if SHost == None:
Line = "%s,%s %s" %(Host,gethostbyname(Host),I);
else:
- Line = "%s,%s,%s %s" %(Host,Host[0:SHost],,gethostbyname(Host),I);
+ Line = "%s,%s,%s %s" %(Host,Host[0:SHost],gethostbyname(Host),I);
Line = Sanitize(Line) + "\n";
F.write(Line);
Fdb.write("+%d,%d:%s->%s\n"%(len(Host),len(I),Host,I));