How to set restrictions on a site collection

With Office Server SP1 out now, it looks like we will see a lot security features updates like this one.

This article describes how to set restrictions on a site collection on a computer that is running Microsoft Office SharePoint Server 2007 Service Pack 1 (SP1). The article discusses how to allow access only for users in a particular organizational unit (OU).

Administrators can use the stsadm.exe command to set restrictions on a site collection to allow access only for users in a particular OU. To do this, follow these steps:

1. Click Start, click Run, type cmd, and then click OK.

2.At the command prompt, type the following command, and then press ENTER:

cd /d %programfiles% \Common Files\Microsoft Shared\Web Server Extensions\12\BIN

3.At the command prompt, type the following command, and then press ENTER:

stsadm.exe –o setsiteuseraccountdirectorypath –url site collection url -path OU path

For example, type the following at the command prompt:

setsiteuseraccountdirectorypath –url http://server/sites/s1 -path "OU=MSCRM,DC=redmond,DC=corp,DC=microsoft,DC=com"

Note The path will be the full distinguished name of the OU. The command will set the restrictions to allow only users under "OU=MSCRM,DC=redmond,DC=corp,DC=microsoft,DC=com" to be added to the site collection http://server/sites/s1.

To obtain the OU path, type the following at the command prompt, and then press ENTER:

stsadm.exe –o getsiteuseraccountdirectorypath –url site collection url

When the administrator uses the Stsadm.exe tool or another management tool to manage the site collection, the administrator will be added as a user to the site collection. The command in step 3 will block the administrator from managing the site collection if the administrator does not belong to the OU. To enable the administrator to manage the site collection, type the following at the command prompt, and then press ENTER:

stsadm.exe -o setproperty -url webappurl -pn "peoplepicker-serviceaccountdirectorypaths" -pv paths

Note In this command, paths is a placeholder for a semicolon-separated list of distinguished names.
To see the list of allowed administrator directory paths, type the following at the command prompt, and then press ENTER:

stsadm.exe -o getproperty -url webappurl -pn "peoplepicker-serviceaccountdirectorypaths"

Related KB

HowTo: Create Site Collections with Create Site

If you want to create site collections using create site button, you need to do the following:

  1. Enable Self Service Site Creation in Central Administration
  2. Change behavior of the Create Site button on Site Directory

Enable Self Service Site Creation in Central Administration

  1. Open the Central Administration site

  2. Click Application Management

  3. Click Self-service site management

  4. Select the correct web application (that step is easy to miss)

  5. Select On for Enable Self-Service Site Creation and click Ok.

Change behavior of the Create Site button on Site Directory

  1. From the portal, use the Site Actions menu, select Modify All Site Settings. If you are not on top level site you will need to go to Top Level Site Settings.

  2. Under site collection administration, select Site Directory Settings.

  3. Select the checkbox to create new site collections from sites directory.

Thanks to Mark

HowTo: Index Office 2007 files on SPS 2003

You upload a document or a file that was created by using the 2007 Microsoft Office system to a Microsoft Office SharePoint Portal Server 2003 Web site. When you do this, SharePoint Portal Server cannot index the 2007 Office document or file.

This issue occurs because the 2007 Office iFilters are not included in SharePoint Portal Server 2003. Therefore, the following 2007 Office file formats are not indexed by SharePoint Portal Server 2003:

•.docx

•.docm

•.pptx

•.pptm

•.xlsx

•.xlsm

To resolve this issue, install a 2007 Office program, such as Microsoft Office Word 2007, on the computer that is running SharePoint Portal Server. By default, this procedure also installs the 2007 Office iFilters. To do this, follow these steps:

1.Install Word 2007 on the computer that is running SharePoint Portal Server.

2.Click Start, point to Administrative Tools, and then click SharePoint Central Administration.

3.On the SharePoint Portal Server Site Settings page, click Configure search and indexing in the Search Settings and Indexed Content section.

4.On the Configure Search and Indexing page, click Include file types in the General Content Settings and Indexing Status section.

5.On the Specify File Types to Include page, click New File Type.

6.On the Add File Type page, type the file name extension for the file type that you want to add in the File extension box. The 2007 Office system uses the following file name extensions:

•.docx

•.docm

•.pptx

•.pptm

•.xlsx

•.xlsm

7.Click OK.

KB Article 944445

HowTo: SlipStream WSS and MOSS Security Updates

Microsoft have released an important security bulletin for Windows SharePoint Services v3 and MOSS 2007 – MS07-059.

HowTo for MOSS 2007

Download Security Update to a C:\Downloads\SharePoint

Run this command from the cmd prompt (Assuming your moss installation files are copied to C:\Server12)

officeserver2007-kb937832-fullfile-x86-glb.exe /extract:C:\Server12\Updates

Check C:\Server12\Updates folder to find new files!

HowTo for WSS3

Download Security Update to a C:\Downloads\SharePoint

Run this command from the cmd prompt (Assuming your moss installation files are copied to C:\WSS)

wssv3-kb934525-fullfile-x86-glb.exe /extract:C:\WSS\Updates

HowTo: Display Custom Fields in CQWP

Over at MSDN, the team has demonstrated a howto for displaying custom fields in Content Query Web Parts.

This how-to article shows the steps for modifying the properties in the Content Query Web Part .webpart file so that the Web Part displays content type custom columns from a document library.

You can use the Content Query Web Part to display a dynamic set of items based on a query. The Content Query Web Part enables you to set presentation options that determine how items are displayed on the finished page. The items displayed by the Content Query Web Part always reflect the most current set of items retrieved by the query that the page viewer is authorized to see. The query is run whenever the page that contains the Content Query Web Part is viewed. If new content is added and it meets the query criteria, the Content Query Web Part automatically displays it. By default, the Content Query Web Part does not return all fields for items returned in a query. This visual how-to article demonstrates how to display custom fields in the Content Query Web Part by setting the CommonViewFields custom property and editing the default XSLT transformation used to render items. The steps include:

  1. Adding the Content Query Web Part to a Web page on an Office SharePoint Server 2007 site.

  2. Configuring the Content Query Web Part to work with the Project Status Reports document library and the Project Status Report content type.

  3. Exporting the Content Query Web Part to a .webpart file.

  4. Editing the exported .webpart file and setting the CommonViewFields custom property of the Content Query Web Part to request the Project Status Report content type custom fields.

  5. Editing the default XSLT transformation used by the Content Query Web Part to display the Project Status Report content type custom fields.

  6. Importing the edited .webpart file to a Web page on an Office SharePoint Server 2007 site.

  7. Configuring the imported Web Part to use the new XSL style.

For complete howto, visit here | Video of this howto

Page 1 of 212