LDAP search as a cron
I need to run a cronjob to identify locked accounts on a closed network. I can run the script and it works fine, however it needs to run with root privileges. When I set it up to run in the root cron (either way), it fails saying that root can't connect to the LDAP server. When I run it I'm using sudo -i to become root, but it uses my credentials. That works just fine, but I can't use that method to run root's cron. It needs to run as root and in a cron, I can't figure out how to get past this.
Responses