Question

Locked

DS Utilities & $username$

By multiplexed ·
I'm adding a user to 2003 server using

dsadd user "cn=masha,cn=users,dc=domain,dc=local" -samid masha -display masha -profile "\\server\profiles\$username$"

When I open up AD users & computers, the profile reads exactly "\\server\profiles\$username$"

In other words the $username$ never resolves into the user's username. When the user logs off, the new roaming profile folder is named $username$ for the username, not masha.

If I user %username%, it correctly resolves, exept it resolves to the admin account.

It doesn't matter if I use quotes or not.

My question is how do I get $username$ to resolve correctly to the user's username with the DS Utilities.

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

$JoeUser$

by CG IT In reply to DS Utilities & $username$

ok so is what your saying that when you put in $Joe User$ Active Directory doesn't properly create the user account rather puts in $username$ instead of the actual user name?

Collapse -

Maybe:

by dawgit In reply to DS Utilities & $username$

I would try it this way:
dsadd user "cn=masha,cn=users,dc=domain,dc=local" -samid masha -display masha -profile "\\server\profiles\$masha$"

Loose 'username' and replace with 'masha', the actual users name.

Collapse -

Still not right

by multiplexed In reply to Maybe:

Thanks for everyone's reponse so far. Unfortunately, this still isn't working.

I just tried replacing $username$ with $masha$, but the same thing happens. Masha's profle is set to "\\server\profiles\$masha$". It's still not resolving. The helpfiles say I should be able to use $username$ in the -profile parameter.

My book calls $username$ a "token", which I'm assuming is like a variable similar to %username%, that should resolve to the user's username.

Collapse -

set it

by p.j.hutchison In reply to Still not right

Try:
set username=masha
then run the dsuser command using %username%.

Collapse -

why like that

by lowlands In reply to set it

using the %username% variable to set the homedirectory is great if you want to change this setting for a bunch of users at the same time. you're right, it is supposed to change it to the actual username. But since you add only the one user, why use it?

Why not use:
dsadd user "cn=masha,cn=users,dc=domain,dc=local" -samid masha -display masha -profile "\\server\profiles\masha"

Another thing to try would be to use %username%, instead of $username$

Back to Networks Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums