Changeset 2759 for trunk/locker/sbin/delete-user
- Timestamp:
- Feb 26, 2016, 6:08:08 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/locker/sbin/delete-user
r2146 r2759 37 37 return group_record 38 38 39 def findApacheConfig(l, uid):40 host_records = ll.search_s(41 "ou=VirtualHosts,dc=scripts,dc=mit,dc=edu",42 ldap.SCOPE_SUBTREE,43 ldap.filter.filter_format(44 "(&(objectClass=apacheConfig)" +45 "(apacheSuexecUid=%s))",46 [uid]))47 48 return host_records49 50 39 def findVhost(l, full_name): 51 40 host_records = ll.search_s( … … 73 62 group_record = findGroup(ll, user) 74 63 75 print "Searching for apache configurations..."76 apache_configs = findApacheConfig(ll, user_record[1]['uidNumber'][0])77 78 64 print "Searching for vhost configurations..." 79 65 vhost_configs = findVhost(ll, user_record[0]) … … 83 69 delete_record(ll, group_record[0]) 84 70 85 for config in apache_configs:86 delete_record(ll, config[0])87 88 71 for vhost in vhost_configs: 89 72 delete_record(ll, vhost[0])
Note: See TracChangeset
for help on using the changeset viewer.