Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

automate assigning logon scripts 1

Status
Not open for further replies.

dan

MIS
Oct 7, 1998
298
0
16
US
Background:
We have just recently switched our campus network from Novell to Window 2000 wihtout active directory. Therefore, we are using NT 4.0 Domain server to authenticate logon and NT 4.0 logon scripts. The accounts are created by importing a script into Exchange 5.5 and we use command line batch files to create the home directories and set the permissions to them.

Problem:
While we have scripted most of the account creations, I have not found a way to add a default logon script to every newly created account (as was the case with Novell). We have been manually highlighting all the accounts on one server and specifyihng the home directory to be U: \\server\%USERNAME% and the logon script to be stu.bat (which maps some common drives).

Question:
Is there an easy way to add the home directory and logon script information that goes into the User Manager Profile from the command line? Dan
 
well , just a thought :
check if there is an option at command line to 'copy' a user and not to create one ... then manually create a dummy user ( that his properties are ok ) after copying it , the procedure changes all needed stuff to %username%
and login.bat ( stu.bat ) stayes as it was ...( also the home dir.) Alex,
Problem? No Problem!
Drink more beer...
 
net user /domain USERNAME /homedir:path /scriptpath:script.bat

the above should help


 
Dieselfreak-
Thanks for the suggestion. I will try it. If it works, it is exactly what I am looking for.
Dan Dan
 
You can also try using the ADDUSERS command in the Nt resource kit. This allows scripted creation of user accounts, including logon scripts and group membership.
 
Dieselfriek's suggestion worked perfectly. Thanks!
Are any of you aware of a good resource that documents such command line interface commands for NT / Win2K? I have not seen this kind of thing documented anywhere.
Dan Dan
 
I have a common set of lines that everyone uses. I have created one batch file with these in.
You can then call this from your individual login scripts. If in future you need to make a change , you only need do it once.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top