Modify Profile paths and user directory in mass.

Tech-Archive recommends: Fix windows errors by optimizing your registry



We are changing the location of users profiles and home directories and I
want to do it with a script since there are a lot of users. I have a test
environment set up in virtual server 2005 and tried doing the below things
which I cant figure out what is causing the hang up. Im thinking this should
be the easiest method once its working but if anyone has any other
suggestions I am open to them. I can not figure out what is wrong with this
and have looked up and tried a lot of variations and get simmilar results.
If someone could take a look and can tell me I would very much appreciate it!

Thanks!

Run Command: Ldifde –f users.ldf –d
“OU=Stduser,OU=Accounts,DC=phytest,DC=intranet” –l
“homeDirectory,homeDrive,profilePath”

OUTPUT to users.ldf:

dn: OU=StdUser,OU=Accounts,DC=phytest,DC=intranet
changetype: add

dn: CN=Mike Kehdi,OU=StdUser,OU=Accounts,DC=phytest,DC=intranet
changetype: add
homeDirectory: \\server1\users\kehdimic
homeDrive: Z:
profilePath: \\server1\profiles\kehdimic

dn: CN=Rio,OU=StdUser,OU=Accounts,DC=phytest,DC=intranet
changetype: add
homeDirectory: \\server1\users\rio
homeDrive: Z:
profilePath: \\server1\profiles\rio


Change to:

Line01
Line02 dn: OU=StdUser,OU=Accounts,DC=phytest,DC=intranet
Line03 changetype: modify
Line04
Line05 dn: CN=Mike Kehdi,OU=StdUser,OU=Accounts,DC=phytest,DC=intranet
Line06 changetype: modify
Line07 homeDirectory: \\server2\users\kehdimic
Line08 homeDrive: Z:
Line09 profilePath: \\server2\profiles\kehdimic
Line10
Line11 dn: CN=Rio,OU=StdUser,OU=Accounts,DC=phytest,DC=intranet
Line12 changetype: modify
Line13 homeDirectory: \\server2\users\rio
Line14 homeDrive: Z:
Line15 profilePath: \\server2\profiles\rio

SAVE FILE (note: ‘Linexx’ is not actually in the file, noted for reference
of the error)

Run Command : ldifde –I –f users.ldf

OUTPUT:
Connecting to “WSUS3-DC.phytest.intranet”
Logging in as current user using SSPI
Importing directory from file “users.ldf”
Loading entries
There is a syntax error in the input file
Failed on line 5. The last token starts with ‘m’.
0 entries modified successfully.
An error has occurred in the program
No log files were written. In order to generate a log file, please
Specify the log file path via the –j option.

-------------------

I also tried with quotes around the fqdn in line 5 thinking that because
there is a space in Mike Kehdi it caused a problem but it got the same error.

.



Relevant Pages