Re: Adding domain users to a site document library from command-li



hi again

first of all, thanks 4 your reply

what i want to do is set permissions on document library level in a
sharepoint site.
now what i have to do is set them step by step.... :(

If u can help me ... thanks in advanced.

salva.


Indigenous ha escrito:

Salva

You asked for some sample code to add users to the group.

The following ldifde script will do the job much more simply than dot net

you'll need to change the dn of the group to reflect the location of the
group in your own AD, likewise for the users.
Create a file with the following in it (not the dash on the last line is
important). call the file addmembers.ldf.

There's tonnes of documentation on the web on ldifde.

dn: CN=Test Group 1,OU=myou, DC=DEV,DC=test,DC=COM

changetype: modify

replace: member

member: CN=user1,OU=myou,DC=DEV,DC=test,DC=COM

member: CN=user2,OU=myouDC=DEV,DC=test,DC=COM

-

use this command line to run it (not the location of the ldifde program may
vary - if it's not on your windopws server already, you can download it free
form microsoft)

LDIFDE.exe -b adminaccount DC=DEV,DC=test,DC=COM * -i -f "AddMembers.ldf" -j
"logs\ADGroupsImport_AddMembers"




"salva.gomez@xxxxxxxxx" wrote:

Hi Indigenous
can you send me this example to my mail address?

Thanks a lot

Salva.


Indigenous wrote:

You could just add an NT security group account to the library then you
problem is simply one adding users to an NT group (outside of sharepoint). I
suspect there are plenty of examples of how to script that on the web. The
only example i have is using .NET and the DirectoryServices assembly.

"salva.gomez@xxxxxxxxx" wrote:

Hi
i'm looking for an script or something to add users to document
libraries stored in sites.
Anyone know how to do it? I have one script made for SPS2001 to do
this, but for SPS2003 i dont know if it can be possible ( i hope it :D
)

I want to use it to add permissions in a batch process (quickly than
GUI...)

Thanks

Salva.





.



Relevant Pages

  • Re: SMS Installer cannot create an NT Service
    ... If you want to post the script I could look over it real quick and see if I ... You can set permissions on registry keys and hives through something like ... I did a repackage of this install using SMS ...
    (microsoft.public.sms.installer)
  • Re: Set public folder permissions?
    ... If you have an example script, on how to set permissions on ... > How are you authenticating against the server in your app? ... >> I'm trying to set permissions on a public folder in my exchange setup. ...
    (microsoft.public.exchange.development)
  • Re: make installworld, permissions and labels
    ... >> and MAC labels on system binaries. ... >> I have a set of scripts to set permissions on everything but that's ... > I would think that easier than a script. ...
    (FreeBSD-Security)
  • Re: NTFS Effective Permissions?
    ... No one seems to know how to set permissions of ... a registry key from script - a really BASIC task. ...
    (microsoft.public.scripting.wsh)
  • Adding change comment through script
    ... Is it possible to add a change comment (or effectively check-in/check-out) ... I currently have a script ready for bulk upload/download files to/from a ... sharepoint site and wanted to extend it to add comments also. ...
    (microsoft.public.sharepoint.portalserver.development)