Network Administrator Knowledgebase

Jun 27 2008   11:22PM GMT

BESadmin and ‘Send As’ Right

Michael Khanin Michael Khanin Profile: Michael Khanin

If you are working with BES (BlackBerry Enterprise Server) you can get a problem, when users cannot send emails from their Blackberry. And, I guess you already familiar with a “Send As Permission” problem :).

So, I created a script, that allows set all neccesasry right to the BESADMIN account. When you run script, you should provide an OU, where the particular user exist and user’s email address.

NOTE: In my script I used linex.exe and dsacls.exe. Just use Google to download those very POWERFUL tools 😉

@echo off
SET Tools=C:\Tools

SET ou4user=

DSQUERY OU domainroot > %TEMP%\ou.txt
%Tools%\linex -n < %TEMP%\ou.txt

SET /p SOU=”Please type # of OU where the user located: ”
SET /p BES=”Please type user’s email address: ”

FOR /F “TOKENS=* delims==,OU” %%a in (‘%Tools%\LINEX -l %SOU% ^<%TEMP%\OU.txt’) do set ou4user=%%~a

FOR /F “TOKENS=2 delims==,” %%a in (‘dsquery * “%ou4user%” -attr mail distinguishedName^|find /i “%BES%”‘) do set BES-USER=%%~a

@echo “%BES-USER%”

dsacls “CN=%BES-USER%,%ou4user%” /G “%USERDOMAIN%\BESADMIN:GR”
dsacls “CN=%BES-USER%,%ou4user%” /G “%USERDOMAIN%\BESADMIN:CA;Send As”

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: