Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 649
  • Last Modified:

PHP xcacls.vbs

I am running (PHP + IIS) a command line job (job.bat) which has xcacls command running.

When I run job.bat manually by typing in the cmd line of the server it works fine. But when I run it from the webpage (php) it runs but showing an error that i can't find the doman\account as follows.

Can't find Account: "DOMAIN_22\KMercs" Could not find /G user/group: "DOMAIN_22\KMercs" removing from list. Can't find Account: "DOMAIN_22\KMercs" Could not find /D user/group: "DOMAIN_22\KMercs" removing from list. Error: No Groups or Names entered were found, exiting script. Operation Complete Elapsed Time: 1.050781 seconds. Ending Script at 10/3/2007 5:08:24 PM


xcacls in the job.bat looks as follows

c:\batch\xcacls c:\folderxyz /E /G  Domain_22\Admin:F /server HCIFPVS01 /user Domain_22\Admin /Pass XPasswrX

Thanks for your response.
0
ITHCI
Asked:
ITHCI
  • 2
  • 2
2 Solutions
 
Michael PfisterCommented:
The PHP script probably runs under a limited account, like IUSR_xxxx (which is machine local if the IIS is not a domain controller). Therefore it can't query the active directory for accounts.
It may help if you connect to the domain in your script like:

net use \\<domain controller>\ipc$ /user:<domain>\<username> password
c:\batch\xcacls c:\folderxyz /E /G  Domain_22\Admin:F /server HCIFPVS01 /user Domain_22\Admin /Pass XPasswrX
net use \\<domain controller>\ipc$  /del /y

hope it helps


0
 
ITHCIAuthor Commented:
My apologies for not replying to this for so long.

The anonomus access was disabled and integrated windows auth was enabled in the IIS.

The user i am loging in to webpage is a domain account have access to query active directory.






0
 
Michael PfisterCommented:
Hm, for debugging add a line before your xcacls statement

set  > C:\TEMP\env.log

Then do what calls the script . Afterwards have a look at the env.log. Check if USERNAME is correct.
0
 
ITHCIAuthor Commented:
Yes. The username is correct.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now