windows - How to scan network for shares with permissions granted to users which have been deleted (and then delete them) -
i'm looking clean permissions user accounts have been deleted.
i able scan top-level shares in domain , remove permissions. i've taken @ share enum doesn't seem set type of activity.
the non-existance of user can determined successful failed lookup. means need able query ad successfully, , ad needs respond user doesn't exist. need sure able query whole distribution of ad-structure. i'm not sure way go.
you can use command cacls
or icacls
list permissions , take action. consider highly dangerous route go. network error causes failure in lookup result in loss of unwanted files.
instead should consider moving users quarantine ou , disabling them. list of ou members , process cacls
output.
set objgroup = getobject ("ldap://cn=deletedusers, dc=your,dc=domain") each objmember in objgroup.members wscript.echo objmember.name next
Comments
Post a Comment