Question

I'm trying to create a site collection via stsadm. I do:

STSADM -o createsite `
    -url "<url>" `
    -title "<title>" `
    -description "<desc>" `
    -lcid 1033 `
    -owneremail "<user email>" `
    -sitetemplate "STS#1" `
    -ownerlogin "<domain\user.name>"

(Sidenote: I'm in Powershell with an alias set up for stsadm.)

When I run the command, at the Powershell prompt I get only the following output:

User cannot be found.

If I look into the ULS logs, I see the following related logs (truncated a bit for clarity):

  • Creating site http://somehost/sites/test in content database WSS_Content_768e4db1bf23493085857cd381b2f72e
  • Error when trying to get trusted forests and domains. Exception message: Current security context is not associated with an Active Directory domain or forest.
  • Found 0 trusted forests .
  • Found 0 trusted domains
  • Error in resolving user '<domain\user.name>' : System.ComponentModel.Win32Exception: Unable to contact the global catalog server

If I create a site collection through Central Administration, using the same <domain\user.name> credentials, the site collection is created fine.

Any ideas as to how to fix this problem? (Just to note, I created a web application via stsadm with the same user credentials and that worked fine.)

Was it helpful?

Solution

I wonder if the security context it's referring to is the security context of the script?

I suppose I've got 2 questions:

  1. Are you running the script on the SPT server or remotely?
  2. Does the account you're running under have the rights to create a site?

OK 3 questions... Can you log into SPT with the account you're using in the ownerlogin parameter?

I'm also curious as to why you aliased stsadm? If it's in your path, you should be able to execute it anyway.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top