export PATH=/opt/zimbra/bin:$PATH
export PERL5LIB=/opt/zimbra/common/lib/perl5
Create a script in /opt/zimbra and add above two variables if you want to run the script in zimbra(cron will run in root) .
create cron in root as given below .
*/15 * * * * /bin/bash '/opt/zimbra/lockaccountactive.sh'
In script lockaccountactive.sh add above two variables as given on top .
Without adding these variables script will not run in zimbra and will show command not found error .
Script to be run under crontab in root for auto account activation after 15 min .
Create a script or any other script in /opt/zimbra as given below
[root@mail]# cat lockaccountactive.sh
#!/bin/bash
export PATH=/opt/zimbra/bin:$PATH
export PERL5LIB=/opt/zimbra/common/lib/perl5
for i in `zmaccts |awk {'print $1,$2'}|grep -i lockout|awk {'print $1'}`; do zmprov ma $i zimbraAccountStatus active ; done
export PERL5LIB=/opt/zimbra/common/lib/perl5
Create a script in /opt/zimbra and add above two variables if you want to run the script in zimbra(cron will run in root) .
create cron in root as given below .
*/15 * * * * /bin/bash '/opt/zimbra/lockaccountactive.sh'
In script lockaccountactive.sh add above two variables as given on top .
Without adding these variables script will not run in zimbra and will show command not found error .
Script to be run under crontab in root for auto account activation after 15 min .
Create a script or any other script in /opt/zimbra as given below
[root@mail]# cat lockaccountactive.sh
#!/bin/bash
export PATH=/opt/zimbra/bin:$PATH
export PERL5LIB=/opt/zimbra/common/lib/perl5
for i in `zmaccts |awk {'print $1,$2'}|grep -i lockout|awk {'print $1'}`; do zmprov ma $i zimbraAccountStatus active ; done
Statistics: Posted by narenderbisht.2009 — Sat Jan 06, 2024 7:58 pm