Solved

Add multiple users and shares

Posted on 1998-09-22
3
339 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article is in response to a question (http://www.experts-exchange.com/Networking/Network_Management/Network_Analysis/Q_28230497.html) here at Experts Exchange. The Original Poster (OP) requires a utility that will accept a list of IP addresses …
We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now