4 replies
by d0c_h0l1day
I do something similar, but its in a novell environment. I don't know why it wouldn't work for NT. I use a simple batch file that I run from my laptop connected to the server that holds the home directories. In the batch file I delete the old andcopy up a default user home directory so when they log in they start from scratch.
The following is an example of what I use:
@ECHO ON
IF "%1"=="" GOTO ERROR
REM Substitute ServerName for the name of your server
MAP ROOT P:=ServerName/VOL1:USERS
MAP ROOT S:=ServerName/vol1:USERS\dfaultgm.nt4
:LOOP
DELTREE /y P:\%1\*.* /s
NCOPY S:\*.* /s P:\%1
DELTREE /y P:\%1\*.* /s
SHIFT
IF "%1" == "" GOTO DONE
MAP DEL P:
MAP DEL S:
GOTO LOOP
:ERROR
ECHO No user specified!
:DONE
by jkosman
by choonhian
You can actually "automate" the account/home directory creation process as well as account/home directory deletion process.
Use the following tools from NT ResourceKit in your script.
Account/Home Directory Creation Script:
NTUSER.EXE -s DOMAIN_SRV_NAME ADD NTACCOUNT -full_name "FULL NAME" -password NTPASSWORD
XCOPY c:\defaults\home \\homeserver\share\NTACCOUNT /S /E /I
Account/Home Directory Deletion Script:
NTUSER.EXE -s DOMAIN_SRV_NAME DELETE NTACCOUNT
RD /S /Q \\homeserver\share\NTACCOUNT
Above are just exmaples, you may change them to variables that can be entered as command line parameters.
by jkosman
This discussion is closed to new replies.
Trending Windows Forum posts
Sort by Trending