Matthew <> wrote:
> Hi,
>
> On my fileserver I have shares based on usernames of the Active
> Directory.. so I got:
>
> userx001
> userx002
> usery001
> userz001
>
> How can i do a logon script that maps P:\ according to the username
> please?
>
> Basically I want that:
> userx001 gets mapped \\fileserver\userx001
> userx002 gets mapped \\fileserver\userx002 ... etc
Well, you could use net use p: \\fileserver\%username% /persistent:no
>
> Is this possible? Or I should manually change the logon.bat for each
> please? (I got more than 50 users)
Eeeek - don't use individually assigned login scripts in ADUC, let alone
different ones per user.
>
> Also to map another folder depending on the group I am going to follow
> this tutorial: Login script with drive mappings based on .. Any other
> info you might suggest please?
>
> Am preparing for tomorrow's long day at work so doing some home work
> to be ready to get the migration as fast as possible 
>
> Thanks for your help!
Hmmm. I would consider changing the requirements. This could be a bit of a
mess. Why do you need it to be set up this way? Home directories are a bit
archaic as a concept - and even if you wanted to use them, you shouldn't set
up a share for each user. You can map to a subfolder, you know - even using
net use commands. If you set up a folder on the server (d:\data\home) and
shared it as HOME$ (the $ makes it hidden) you could use
net use p: \\fileserver\home$\%username% /persistent:no
(not getting into the permissions issues, which are separate).
But instead of this, I'd use folder redirection via Group Policy so each
user's My Documents folder pointed at \\server\user_share\%username%\My
Documents. You don't need drive mappings that way (although you could use
them if you wanted.... net use p: "\\server\user_share\%username%\My
Documents" /persistent:no ). Your permissions could be dynamically and
properly created.
Some links to info on folder redirection:
How to dynamically create security-enhanced redirected folders by using
folder redirection in Windows 2000 and in Windows Server 2003 -
http://support.microsoft.com/kb/274443
Roaming profile & folder redirection article -
http://www.windowsnetworking.com/art...rver-2003.html
Ace Fekay's article on folder redirection -
http://msmvps.com/blogs/acefekay/arc...direction.aspx
Instead of ADUC to assign login scripts, use group policy to assigned login
scripts. This is much more flexible and easier to manage. If you want to
test this out w/o removing the login.bat (or whatever it's called) from each
user's ADUC properties you could edit the existing batch file in your
NETLOGON share so the beginning of it says
----------------------
GOTO END
<old login script stuff>
:END
exit