Dear colleagues,
once again i need a little help.
I am using quite complex Squid & DansGuardian setup where i authenticate users from Active Directory over NTLM, and use multiple groups with different levels of web access. Everything works great and i would be glad to share my setup with anyone who is interested.
However, i have a little problem. I am using following script:
http://dansguardian.org/downloads/agawronski/usermap2
to pull users from Active Directory and map them to appropriate access groups in DansGuardian. The script (after few path modifications and chmodding to 777) works fine if i run it from command line like:
[CMD="rsbgyucsquid05# "]/usr/local/bin/bash /usr/local/etc/dansguardian/usermap2[/CMD]
but if run from cron, as root:
[CMD=""]@daily /usr/local/bin/bash /usr/local/etc/dansguardian/usermap2 >/dev/null 2>&1[/CMD]
it creates empty file.
So, i would like to make it work as a cron job, preferrably by converting it to sh script. If someone can do this for me i would be very thankful. I know i deserve an answer such as 'do it yourself' as i would be able to rewrite it myself after a bit of reading. I need it quite fast however.
Second solution would be if someone advised me how to run bash scripts from cron.
Thank you in advance,
once again i need a little help.
I am using quite complex Squid & DansGuardian setup where i authenticate users from Active Directory over NTLM, and use multiple groups with different levels of web access. Everything works great and i would be glad to share my setup with anyone who is interested.
However, i have a little problem. I am using following script:
http://dansguardian.org/downloads/agawronski/usermap2
to pull users from Active Directory and map them to appropriate access groups in DansGuardian. The script (after few path modifications and chmodding to 777) works fine if i run it from command line like:
[CMD="rsbgyucsquid05# "]/usr/local/bin/bash /usr/local/etc/dansguardian/usermap2[/CMD]
but if run from cron, as root:
[CMD=""]@daily /usr/local/bin/bash /usr/local/etc/dansguardian/usermap2 >/dev/null 2>&1[/CMD]
it creates empty file.
So, i would like to make it work as a cron job, preferrably by converting it to sh script. If someone can do this for me i would be very thankful. I know i deserve an answer such as 'do it yourself' as i would be able to rewrite it myself after a bit of reading. I need it quite fast however.
Second solution would be if someone advised me how to run bash scripts from cron.
Thank you in advance,