Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Active Directory > Re: Windows Logon Scripts


Reply
Fix Vista Errors
Thread Tools Display Modes

Re: Windows Logon Scripts

 
 
Lanwench [MVP - Exchange]
Guest
Posts: n/a

 
      12-07-2009
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



 
Reply With Quote
 
 
 
 
Lanwench [MVP - Exchange]
Guest
Posts: n/a

 
      12-08-2009
Matthew <> wrote:
> Thanks alot Lanwech. The problem is that the user shares are already
> there filled in with files.


Yeah, but you can fix that easily.

> The previous admin used to give a folder
> each to the users


A folder per user is fine. A *share* per user is *not*.

> and some are really filled up. Yesterday we renamed
> each folder to the new username. The previous admin used to manually
> map all the drives - I am trying to make it a bit more easier for
> myself.


Yes, agreed. Plan carefully and do this right now, and you won't have such
trouble in the future...
>
>
> So if I do: net use p: \\fileserver\home$\%username% /persistent:no
> in each of the batching (.bat) files will it work? Or the username has
> to be hard coded in each batch file?


%username% will work. Share the parent folder ... the HOME$ one, as hidden,
with everyone = full control. Leave the NTFS alone. Leave the subfolder
shares alone. See whether this works.... if it does, you can unshare the
subfolders.
>
> I cannot map the My Documents folder. Its quite sensitive data and all
> users want their My Documents to reside on their own box. Its a
> business rule we have here.


This should not be up to the users. Your business rule is dumb, honestly. If
it's sensitive, it doesn't belong on a cheap desktop hard drive on a
workstation where it isn't part of a central backup (if it's indeed backed
up at all) and where absolutely anyone can walk up to it and access it
(don't tell me they can't - it's a trivial thing to do). If this is
business data, it belongs on the corporate server, locked down so only the
user & the admin have any access - and the company should hire only admins
they can trust.
>
>
> Thanks for your help
>
>
> On Dec 8, 12:29 am, "Lanwench [MVP - Exchange]"
> <lanwe...@heybuddy.donotsendme.unsolicitedmailatya hoo.com> wrote:
>> Matthew <mpu...@gmail.com> 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/articles_tutorials/Profile-Folder-Re...
>>
>> Ace Fekay's article on folder redirection
>> -http://msmvps.com/blogs/acefekay/archive/2009/09/08/folder-redirectio...
>>
>> 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




 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Two problems resulting from failed dual boot install lysander Windows Vista Installation 6 03-03-2010 01:26 AM
Failed installations under Windows Update - what to do? cjd Windows Update 6 12-28-2009 12:24 AM
Can download updates, but will not installs Peter Windows Update 4 11-16-2009 01:30 PM
Windows Live Mail does not import sub-folders from Windows Mail Bharani Windows Vista Mail 2 11-16-2009 12:36 AM
How do you repair windows entirely using your Windows Vista DVD Jonathan Yaniv- Windows Live Butterfly Expert Windows Vista Performance 16 02-12-2008 06:28 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59