Fix freenas-debug to work with all the new AD and LDAP stuff

Ticket: #5417