locked
Permission to User for Multiple Sites RRS feed

  • Question

  • Hi,

    Can we give permission to a user for multiple sub-sites without navigating to each and every site? For Instance a User A needs to be assigned permission to 50 sub-sites. I can open all the sub-sites and give permission to the user for each site. This is very hectic. I want to assign permission to this user to all the sites without navigating to all the sites.

    Any help or suggestion is greatly appreciated

     


    pankaj
    Wednesday, June 8, 2011 11:58 AM

Answers

  • Hi Pankaj,

    Yes you can try and do it in one batch. To get you started work on the folloiwng syntax and adjust it to your requirements.

    @echo off
    echo ===============================================================
    echo apply permissions
    echo ===============================================================
    cd %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\BIN
    @echo off
    stsadm –o userrole –url <full url> –userlogin <domain\user or SharePoint group> –role <role, such as Contribute or “Full Control”>
    echo completed 

    hth,


    Chirag Patel, MCTS
    Blog: techChirag.com
    Twitter: @techChirag
    • Marked as answer by Leoyi Sun Tuesday, June 14, 2011 9:32 AM
    Thursday, June 9, 2011 8:33 PM

All replies

  • These are sub-sites, so that means there is at least one site above them.

    Give people access to the site(s) above them and they will have access rights to all the sub-sites provided those have been created with inherited permissions (which is default).


    SP 2010 "FAQ" (mainly useful links): http://wssv4faq.mindsharp.com/default.aspx
    WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx
    Both also have links to extensive book lists and to (free) on-line chapters
    Wednesday, June 8, 2011 3:34 PM
  • Setting up security groups for the various subsites may also make things easier in the long run, set permissions up for the security groups and then just add respective members to the group via AD - should give them permissions that the groups have.

    Wednesday, June 8, 2011 4:11 PM
  • Hi Pankaj,

    You can run STSADM command as follows:

    stsadm –o userrole –url <full url> –userlogin <domain\user or SharePoint group> –role <role, such as Contribute or “Full Control”>

    For further details please visit http://technet.microsoft.com/en-us/library/cc262083(office.12).aspx

    hth,


    Chirag Patel, MCTS
    Blog: techChirag.com
    Twitter: @techChirag
    Wednesday, June 8, 2011 9:15 PM
  • Thanks for the replies,

    I can't give permissions to the top level site.

    If I create a security group and assign permission to this group, I still need to open each and every site to do it.

    STSADM command sounds good, Can I create a batch file and pass the site name as parameter and execute the batch command at one shot.

    Thanks


    pankaj
    Thursday, June 9, 2011 9:41 AM
  • Hi Pankaj,

    Yes you can try and do it in one batch. To get you started work on the folloiwng syntax and adjust it to your requirements.

    @echo off
    echo ===============================================================
    echo apply permissions
    echo ===============================================================
    cd %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\BIN
    @echo off
    stsadm –o userrole –url <full url> –userlogin <domain\user or SharePoint group> –role <role, such as Contribute or “Full Control”>
    echo completed 

    hth,


    Chirag Patel, MCTS
    Blog: techChirag.com
    Twitter: @techChirag
    • Marked as answer by Leoyi Sun Tuesday, June 14, 2011 9:32 AM
    Thursday, June 9, 2011 8:33 PM
  • Thanks a Lot Chirag, I will check this and update this post
    pankaj
    Friday, June 10, 2011 7:33 AM
  • Hi Pankaj,

    I am also looking for the same solution. Were you able to create a batch file for this?

    -JaSac

    Friday, July 1, 2016 2:26 PM