Monday, September 14, 2009

STSADM: Access Denied

You may get an "Access Denied" error running the SharePoint command-line administration tool stsadm.exe on Windows 2008, even if you are loggend in with an administrator account. One possible reason for that is UAC (User Access Control). According to the UAC Guide on TechNet, administrators receives two credentials set when they log on: a "normal use" credential and an "administrative" credential. That's because on Vista and W2008 an application may mark itself as administrative task, and when someone tries to start that application, UAC shows the "Windows needs your permission to continue" dialog box:

When you click "Continue", Windows uses the "administrative portion of your logon credentials" to run the application.

The problem is when this dialog box is not shown. For instance, when you open a command prompt and try to run stsadm.exe. You simply get and "Access Denied" message. That's because the command prompt trying to run stsadm has to be opened with administrative rights:

Since the application trying to run stsadm (the command prompt itself) is running with the "administrative credentials" of your administrator account, the access denied message should go away.

No comments:

Post a Comment