GeordieSteve
07-06-07, 14:10
Evening folks!
I'm having a spot of bother with a dsmod script to change the users home drive in AD. I want to do it this was so it'll create relevent permissions (i.e. grant the user only access to their own user folder). The script I have so far is:
dsquery user "OU=IT,DC=domain,DC=co,DC=uk" -limit 0|dsmod user -hmdrv U -hmdir \\albrta_fs1\user\%username%
Now this runs and works fine but when you check the user home drive settings out it sets everyone path to \\albrta_fs1\user\administrator, the first username on the list.
Is there any way I can get it to pick up the user name in the same way as if you manually put %username% into the field?
I'm having a spot of bother with a dsmod script to change the users home drive in AD. I want to do it this was so it'll create relevent permissions (i.e. grant the user only access to their own user folder). The script I have so far is:
dsquery user "OU=IT,DC=domain,DC=co,DC=uk" -limit 0|dsmod user -hmdrv U -hmdir \\albrta_fs1\user\%username%
Now this runs and works fine but when you check the user home drive settings out it sets everyone path to \\albrta_fs1\user\administrator, the first username on the list.
Is there any way I can get it to pick up the user name in the same way as if you manually put %username% into the field?