HOME Share

  • Thread starter Thread starter WB
  • Start date Start date
W

WB

Hi all

I am using CSVDE to create a number of users withing AD. The problem I have
is, this way does not create the users home shares, does anyone know of a
way to create a number of users home shares in bulk from a number of names
within a text file

w
 
WB said:
Hi all

I am using CSVDE to create a number of users withing AD. The problem I have
is, this way does not create the users home shares, does anyone know of a
way to create a number of users home shares in bulk from a number of names
within a text file

w

You can do this with an ordinary batch file:

@echo off
for /F %%a in (c:\users.txt) do (
md d:\UserShares\%%a
net share %%a=d:\UserShares\%%a
cacls d:\UserShares\%%a /t /e /g %%a:F
)

c:\users.txt is supposed to contain a list of user names,
with no embedded spaces (e.g. JSmith).
 
Hi Pegasus

I've taken your script below and ammended it as below. The dir is being
created with no problems but I am experiencing 2 problems.

1. I am getting an error - No mapping between account names and security IDs
was done

2. No permission are being set for the user

any ideas

for /F %%a in (c:\users.txt) do (
md \\DC1\Home\%%a
net share %%a=\\DC1\Home\\%%a
cacls \\DC1\Home\%%a /t /e /g %%a:F
)


wayne
 
I work in a college, so students have users names like, 40001. We are
working in a windows 2000 environment
 
Type in these commands manually and see what you get:

net user 40001
net user 40001 /domain
cacls d:\UserShares\40001 /t /e /g 40001:F
cacls d:\UserShares\40001 /t /e /g domain\40001:F
 
Hi again

I have managed to get it to work. I ran it localy on the server. I also
managed to run it over the network, but get an error with the net share -
The syntax of this command is: can I run net share over a network?

w
 
Hi Pegasus

Thanks for all of that. I will work with psexec.exe I am sure I will be
able to work it out if not I can run on server. Thank you once again
wayne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top