Remember this for a high school - may not be practical for all

The hard part was the excel spreedsheet. Each year we create all new student accounts & delete old ones. Each student must have a unique student id based upon their name & user directory.

We import a student list for the school of First name, Middle Name, Last Name, Grade group & the excel macro generates a unique list of student ID and passwords based upon there names plus a field of Full name & comment which equals there grade group. The macro also generates 2 bat files - 1 for account creation & 1 for account deletion plus various list for teachers.

Each line in the creation bat file looks something like:

crestd userid password fname comment edate


the creation bat file looks something like this

NET USER %USERID% %password% /add
NET USER %USERID% /scriptpath:LOGON.BAT /passwordchg:no /passwordreq:yes
NET USER %USERID% /times:M-F,7AM-6PM
NET USER %USERID% /fullname:%fname% /comment:%comment% /expires:%edate%
NET GROUP STUDENT %USERID% /ADD
MD d:\USERS\Z%USERID%
XCACLS.EXE D:\USERS\Z%USERID% /t /c /g administrator:fo;fo webmaster:f;f %USERID%:f;f /y
NET USER %USERID% /homedir :\USERS\Z%USERID%
RMTSHARE \\server\%USERID%$=D:\USERS\Z%USERID% /grant %USERID%:f users:2 /remark:%FNAME%
RMTSHARE \\server\%USERID%$ /grant administrators:f
RMTSHARE \\server\%USERID%$ /grant %USERID%:f

The above is not the exact file since the parameters would be %1%, %2%, etc. Also I don't have the actual files on hand so I made this up on the spot. Thus there may be errors.

I also played around with the adduser utility and using the for command but this method seems simpler & more direct.

[This message has been edited by JackLothian (edited 29 August 2000).]

_________________________
Jack