Solved

Add multiple users and shares

Posted on 1998-09-22
3
380 Views
Last Modified: 2013-12-19
I'm preparing a migration from OS/2 PDC to a NT4 SP3 PDC.  I have about 800 users to migrate.  When I use ADDUSER from the resource kit I can easily add the users to the security db and create a home directory on the server.  I want my clients (WfW 3.11 right now) to access these directories as shares.  When I'm trying to use RMTSHARE from the resource kit to convert the homedirs in shares, access is denied because I'm not the owner of the directories (even though I'm doing this on the console of the PDC as administrator).  If I change the permissions of the USERS root directory and the subdirs on the other hand, the shares can be created, but users have no access anymore (they have permission in share, but no permission in NTFS).
Any suggestions how to solve this?
0
Comment
Question by:wilfrieds
  • 2
3 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 50 total points
ID: 1562672
SET user=account_name
md       \\server\C$\home\%user
rmtshare \\server\%user$=C:\Home\%user
cacls    \\server\Home$\%user /E /G %user:f
SET user=
0
 
LVL 1

Author Comment

by:wilfrieds
ID: 1562673
I may not be doing this the right way.  I'm logged in as administrator.
This is what i do.

Set user=wilfried
md \\server\d$\users\%username%  ==> gives me subdir administrator
rmtshare \\server\%username$=d:\users\%username% ==> returns error 5
cacls ...   ==> does not find command cacls

Also, the idea was to import users from a flatfile which creates the accounts and creates the homedirs.  Adduser.exe does that fine, but doesn't create the shares.

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1562674
Ok, I missed adduser.exe, 'cause I thaught that you still have a script.
cacls.exe can also be found in the reskit (where you get addusers.exe from:)

You used   %username%  which, in fact, is you login name (administrator here), that's the reason why I used a variable %user . You may use %1 instead of %user and call the script as follows:

FOR /f %%u IN ('type file_with_usernames_one_per_line') DO script.cmd %%u
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A common practice in small networks is making file sharing easy which works extremely well when intra-network security is not an issue. In essence, everyone, that is "Everyone", is given access to all of the shared files - often the entire C: drive …
This is the first one of a series of articles I’ll be writing to address technical issues that are always referred to as network problems. The network boundaries have changed, therefore having an understanding of how each piece in the network  puzzl…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question