Using STSADM to give Sharepoint Groupes or Active Directory Users/Groupes permissions to a Sharepoint Site [MOSS]

Recently I had to modify a series of sub-sites (all of them under one site). These sites are provisioned automatically using a specific webpart on the top site. These sites are used by everyone in the company and permissions are very important. The main issue was that permissions on each sub-site needed to be updated in order to give read access to a new Sharepoint Group which did not existed previously.

The stsadm operation I used was ‘userrole’. The syntax of the userrole operation is as follows:
stsadm –o userrole –url <full url> –userlogin <domain\user or SharePoint group> –role <role, such as Contribute or “Full Control”>

Details of the command on TechNet:

Well..I built my own command in notepad: stsadm –o userrole –url “http://myportal/myfathersite/mysubsiteXXX” –userlogin “My Group Public” –role “Contribute”  and then copy paste to the command line in the 12 hive.  I kept receiving each time: “Command line error” message thrown by stsadm!!

The solution is actually to write the command line your own without doing paste. The reason is the possible wrong encoding of the pasted text.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: