3 # Checks a directory against the passwd file assuming it is the home
6 import string, ldap, getopt, sys, os, pwd;
8 for x in os.listdir(sys.argv[1]):
10 User = pwd.getpwnam(x);
11 st = os.stat(sys.argv[1]+x);
12 if User[2] != st[4] or User[3] != st[5]:
13 print "Bad ownership",x;
15 print "Failed",x,"==> %s: %s" %(sys.exc_type,sys.exc_value);