If you want the script to be send to you directly mail him directly please. ******************************** Met vriendelijke groeten, Rob Beekmans Technical consultant A-Tree Automatisering "The Thin Client specialist" http://www.a-tree.nl ******************************** -----Oorspronkelijk bericht----- Van: jrb@xxxxx [mailto:jrb@xxxxx]=20 Verzonden: Wednesday, August 28, 2002 8:38 AM Aan: thin@xxxxxxxxxxxxx CC: thin@xxxxxxxxxxxxx Onderwerp: [THIN] Ad: Re: Ad: Re: User creation Hei Anders, det ser ut til at 'thethin' listen konverterer en del av teksten - putter inn en del rare tegn o.s.v.. kunne du ha sendt meg scriptet direkte ? Det ser meget bra ut, og er vel ca akkurat det jeg er ute etter :-) mvh Jan Rune Bj=3DF8rkeng citrix-admin Norsk Gjenvinning Holding AS =20 =3D =3D20 Anders Hansen-=3DD8vre =3D =3D20 <anders.hansen-ovre Til: <thin@freelists.=3D org> =3D20 @contra.no> cc: =3D =3D20 Sendt av: Emne: [THIN] Re: Ad: R=3D e: User creation =3D20 thin-bounce@freelis =3D =3D20 ts.org =3D =3D20 =20 =3D =3D20 =20 =3D =3D20 27.08.2002 18:12 =3D =3D20 Vennligst send svar =3D =3D20 til thin =3D =3D20 =20 =3D =3D20 =20 =3D =3D20 Here is a pretty raw edition of the create user script, you'll need some =3D3D kix knowledge to write the script to fit your needs. Hope you like it :) =3D3D All the comments are in norwegian, buy a translation book :) Put a input file in the same folder as the kix script and the vbs files, =3D3D run the script. This will create a temp.bat that you can edit if needed, =3D3D run the temp.bat to create the users. We just used this script to add a little under 20.000 users in a new = =3D3D solution we installed, this took about 3 hours to watch :) -------------------------- ; Create user script written by Anders Hansen-=3D3DD8vre, Konsulenthuset =3D3D Contra ; anders@xxxxxxxxxxxxxxxxx - http://www.contra.no ;=3D3D20 ; Need to have: ; Windows 2000 RescurceKit modules: ; createusers.vbs ; modifyusers.vbs ; usergroup.vbs ; Located in the same folder as the scriptfile. break on IF @PRIV =3D3D3D "User" ?"You are not a admin." exit Endif ; Definerer variabler. $OUTFILE =3D3D3D "Temp.bat" $INFILE =3D3D3D "Users.csv" $PROFILESERVER =3D3D3D "\\server" $HOMESERVER =3D3D3D "\\fileserver" $ADDOMAIN =3D3D3D "DOMAIN" $CHANGEPASS =3D3D3D 0 ; Definerer om brukere m=3D3DE5 bytte passord ved neste =3D3D p=3D3DE5logging. ; 0 =3D3D3D Ikke bytte, = 1 =3D =3D3D3D m=3D3DE5 bytte. ; $INFILE syntax: ; OuID,Brukernavn,Passord,Fornavn,Etternavn,Maildomene (scriptes) if open (1,"@CURDIR\$INFILE",2) =3D3D3D 0 if EXIST ("@CURDIR\$OUTFILE") ?"Fant $OUTFILE, sletter..." DEL "@CURDIR\$OUTFILE" Endif ; =3D3DC5pner $OUTFILE for skriving, oppretter hvis den = ikke finnes. open (2,"@CURDIR\$OUTFILE",5) ; Leser f=3D3DF8rste linje av kildefilen $line =3D3D3D Readline(1) $lineno =3D3D3D 1 while $line <> "" and @error =3D3D3D 0 ; Leser linje X, og splitter opp i et Array basert p=3D3DE5 = , $contents =3D3D3D split($line,",") $ouid =3D3D3D $contents[0] $username =3D3D3D $contents[1] $pass =3D3D3D $contents[2] $fornavn =3D3D3D $contents[3] $etternavn =3D3D3D $contents[4] $domain =3D3D3D $contents[5] =3D3D09 ?"Leser linje " + $lineno + ", behandler bruker: $fornavn $etternavn =3D3D ($username)" $z =3D3D3D writeline(2,"Createusers.vbs ") $z =3D3D3D writeline(2,"LDAP://OU=3D3D3D$ouid,OU=3D3D3D"+chr(34)+"Al=3D l my =3D3D users"+chr(34)+",DC=3D3D3Ddomain,DC=3D3D3Dcom") $z =3D3D3D writeline(2," cn:$username")=3D3D20 $z =3D3D3D writeline(2," SamAccountName:$username")=3D3D20 $z =3D3D3D writeline(2," password:$pass")=3D3D20 $z =3D3D3D writeline(2," displayname:"+chr(34)+"$fornavn = =3D3D $etternavn"+chr(34)) $z =3D3D3D writeline(2," givenname:"+chr(34)+"$fornavn"+chr(34)) $z =3D3D3D writeline(2," sn:"+chr(34)+"$etternavn"+chr(34))=3D3D20 $z =3D3D3D writeline(2," = userPrincipalName:$username"+chr(64) +"$domain") ; $z =3D3D3D writeline(2," Description:"+chr(34)+"$fornavn = =3D3D $etternavn"+chr(34))=3D3D20 $z =3D3D3D writeline(2," homeDirectory:\\$HOMESERVER\$username$") $z =3D3D3D writeline(2," homeDrive:H") $z =3D3D3D writeline(2," ProfilePath:\\$HOMESERVER\Profile $\$username") $z =3D3D3D writeline(2," ScriptPath:"+chr(34)+"kix32.exe = =3D3D Logonscript.kix"+chr(34)) $z =3D3D3D writeline(2," "+chr(13)+""+chr(10)) =3D3D09 ;### Legger brukeren inn i skolen sin XX_Elev gruppe. $z =3D3D3D writeline(2,"USERGROUP.VBS WinNT://$ADDOMAIN/Group1 =3D =3D3D /A:WinNT://$ADDOMAIN/"+$username+""+chr(13)+""+chr(10)) ;### Hvis $CHANGEPASS er satt til 0 skrur vi av "must change password =3D3D at next logon". if $changepass =3D3D3D 0 $z =3D3D3D writeline(2,"ModifyUsers.vbs WinNT://$ADDOMAIN =3D3D name:"+$username+" passwordexpired:0"+chr(13)+""+chr(10)) Endif $z =3D3D3D writeline(2,"md =3D3D \\$homeserver\homes$\$username"+chr(13)+""+chr(10)) $z =3D3D3D writeline(2,"echo y | XCACLS \\$homeserver\homes $\$username /E =3D3D /T /G "+chr(34)+"Domain Admins"+chr(34)+":F"+chr(13)+""+chr(10)) $z =3D3D3D writeline(2,"echo y | XCACLS \\$homeserver\homes $\$username /E =3D3D /T /R Everyone"+chr(13)+""+chr(10)) $z =3D3D3D writeline(2,"echo y | XCACLS \\$homeserver\homes $\$username /E =3D3D /T /G $username:C"+chr(13)+""+chr(10)) =3D3D09 $lineno =3D3D3D $lineno + 1 $line =3D3D3D Readline(1) loop $z =3D3D3D close(1) $z =3D3D3D close(2) ?"Behandlingen av users.csv filen er ferdig" ?"Kj=3D3DF8r temp.bat for =3D3DE5 opprette bruker, hjemmekatalog og = sette =3D3D rettigheter." --- mvh/yours Konsulenthuset Contra as Anders Hansen-=3D3DD8vre, Seniorkonsulent=3D3D20 Mail : anders.hansen-ovre@xxxxxxxxx Cell : (+47) 90 98 17 78 > -----Original Message----- > From: jrb@xxxxx [mailto:jrb@xxxxx]=3D3D20 > Sent: 27. august 2002 17:29 > To: thin@xxxxxxxxxxxxx > Subject: [THIN] Ad: Re: User creation >=3D3D20 >=3D3D20 >=3D3D20 >=3D3D20 > I have also had problems with this, have tried some commands=3D3D20 > - but are very interrested in getting a script which does this : = =3D3D20 > So far I have tried this one called 'createuser.bat' with the=3D3D20 > commandline "createuser <username> <locationgroup> <Full name> >=3D3D20 > net user /add %1 %1 /active:yes /expire:never /Fullname:"%3"=3D3D20 > ;creates the user in AD, and inserts the full name in the AD=3D3D20 > properties, and sets password=3D3D3D3Dusername net group %2 %1 = /add=3D3D20 > ;adds the user in the group written in the command line net=3D3D20 > group AS400 %1 /add ;adds the user to the AS/400 security=3D3D20 > group md \\server20\profiles\%1 ;creates the user profile=3D3D20 > directory md \\server20\d$\brukere\%1 ;creates the user=3D3D20 > profile home directory cacls \\server20\profiles\%1 /e /g=3D3D20 > mydomain\%1:F ;sets permissions for the user to "Full rights"=3D3D20 > on the users profile directory cacls \\server20\d\brukere\%1=3D3D20 > /e /g mydomain\%1:F sets permissions for the user to "Full=3D3D20 > rights" on the users home directory >=3D3D20 > But - is it possible to do more automtically ? Like adding=3D3D20 > the user to a OU, entering what is the users home-dir and=3D3D20 > terminal-server profile dir (in AD).. and other options ? >=3D3D20 > post your scripts ;) >=3D3D20 > Jan Rune Bj=3D3D3DF8rkeng >=3D3D20 >=3D3D20 >=3D3D20 >=3D3D20 >=3D3D20 > -------------------------------------------------------------- > -------------=3D3D3D > ---- > This verifies that this e-mail has been scanned for virus and=3D3D20 > deemed virus-=3D3D3D free=3D3D3D20 according to F-secure Content Scanner=3D3D20 > 5.0 Tue, 27 Aug 2002 17:28:50 +0200 GMT=3D3D20 > -------------------------------------------------------------- > -------------=3D3D3D > ---- >=3D3D20 >=3D3D20 >=3D3D20 > =3D3D =3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D= 3D3D=3D3D3D=3D3D3D=3D3D3D=3D3 D3D=3D =3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D =3D3D =3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D > This weeks Sponsor: > ThinPrint > - High resolution, DRIVER FREE PRINTING with no loss of=3D3D20 quality = > in color. > - Removes print spooling and rendering tasks from your=3D3D20 terminal = > server. http://www.thinprint.com=3D3D20 =3D3D =3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D= 3D3D=3D3D3D=3D3D3D=3D3D3D=3D3 D3D=3D =3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D =3D3D =3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D > For Archives, to Unsubscribe, Subscribe or=3D3D20 > set Digest or Vacation mode use the below link. >=3D3D20 http://thethin.net/citrixlist.cfm =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D= 3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D =3D3D=3D =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D This weeks Sponsor: ThinPrint - High resolution, DRIVER FREE PRINTING with no loss of quality in color. - Removes print spooling and rendering tasks from your terminal server. http://www.thinprint.com =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D= 3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D =3D3D=3D =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D For Archives, to Unsubscribe, Subscribe or set Digest or Vacation mode use the below link. http://thethin.net/citrixlist.cfm ------------------------------------------------------------------------ ---=3D ---- This verifies that this e-mail has been scanned for virus and deemed virus-free according to F-secure Content Scanner 5.0 Tue, 27 Aug 2002 18:12:41 +0200 GMT ------------------------------------------------------------------------ ---=3D ---- ------------------------------------------------------------------------ ---=3D ---- This verifies that this e-mail has been scanned for virus and deemed virus-=3D free=3D20 according to F-secure Content Scanner 5.0 Wed, 28 = Aug 2002 08:38:04 +0200 GMT ------------------------------------------------------------------------ ---=3D ---- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D This weeks Sponsor: ThinPrint - High resolution, DRIVER FREE PRINTING with no loss of quality in color. - Removes print spooling and rendering tasks from your terminal server. http://www.thinprint.com = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D For Archives, to Unsubscribe, Subscribe or=20 set Digest or Vacation mode use the below link. http://thethin.net/citrixlist.cfm =================================== This weeks Sponsor: ThinPrint - High resolution, DRIVER FREE PRINTING with no loss of quality in color. - Removes print spooling and rendering tasks from your terminal server. http://www.thinprint.com =================================== For Archives, to Unsubscribe, Subscribe or set Digest or Vacation mode use the below link. http://thethin.net/citrixlist.cfm