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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active Directory User Templates

Status
Not open for further replies.
Jul 18, 2003
11
US
We have several "template" user accounts in Active Directory that we copy when creating new accounts. This has always worked just fine, but we've recently encountered a problem.

In the past, we specified the Home Folder in the format: \\server\share\%username%. The %username% environment variable was saved in the account as a variable. When the template was copied, the user name would be automatically filled in.

For some reason, Active Directory is now converting the variable to the template's user name when it is saved. As a result, when the template is copied the new user's Home Folder is not set correctly. It has to be manually modified.

Has anyone else seen this or know a workaround?
 
I think it is because someone used the template to setup an account, instead of copying it first...

Just delete the old template and create a new one ...
 
Thanks for the reply vbrocks.

I don't think the problem is that someone used the template to setup an account. I've tried recreating it, but cannot get the %username% variable to remain a variable. As soon as the template is created and saved, the variable is converted to its associated name (ie. user.template).

When it was working, it stayed %username% after being saved. Copying the account and modifying the information resulted in the home path pointing to the correct folder.
 
When you create it make sure you do not put any name in the username field.....
 
The %username% variable is taken from the Pre-Windows 2000 username field. That field is required when creating an account. It won't let you leave it blank.
 
If you set up the template then copy it, then enter the new username in the username field doesn't it take the new username instead and change the variable to that?
 
What I am saying is that the template will have whatever you entered as the username show up in place of the %username% variable, but after you copy it and add the new username info in, it should change over correctly, unless someone replaced the %username% variable with the username in the home directory field of the template.
 
I'll be damned. It's working now. I swear I tried it 50 times and it didn't work. But, you're right. It does change the %username% variable to the name of the user name of the template account, but maintains the fact that it's a variable. When the account is copied, it replaces the variable with the new user's name.

Thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top