Map Drive on Windows Server 2003 R2 at System Boot


Recommended Posts

Hey Guys,

I'm currently setting up a Windows Server 2003 R2 box and have a Service which requires information from a Network Drive, the issue is if the server is rebooted then all Network Drives are dropped until an Interactive Login occurs.

How could I go about setting up the system to automatically mount some drives on the same user as the service on system boot.

Example mount \\server\exampleshare\ as serviceuser@exampledomain.com

Thanks

Chris

  On 26/06/2012 at 17:29, xendrome said:

This only covers mapping drives on Logon - which is already happening.

  On 26/06/2012 at 17:37, sc302 said:

system policy logon script vs user policy logon script. as xendrome is trying to point to.

I'll see if I can find it in the GPOs - Thanks.

  On 26/06/2012 at 18:14, CPressland said:

Well, I had to reboot my Domain Controller due to not being able to RDP into it and it's been 'Applying Computer Settings' for the last half an hour.. joy.

Will update thread when I'm back in.

Sounds like you have a DNS issue...

probably using a internet server as a dns server instead of itself...domain controllers do not follow the same policies as pc's and domain computers do not follow the same policies as home computers.

if it is part of a domain you never use external dns servers....only internal dns servers and if your internal dns server doesn't know about it then it will use either the root dns servers or it will use dns servers you define in the forwarders tab. you normally do not have dns servers at home so using the internet dns servers are fine in that environment.

Okay, did this:

Created a new OU and moved the Server I need this to happen on to said OU.

Created new Policy based on that OU and defined a Startup Script as follows:


net use Z: \\server\share1
net use X: \\server\share2
net use Y: \\server\share3
[/CODE]

Rebooted Server, nothing happened, service still complains no drives can be found.

what do you see in the event logs? also what rights are assigned to those folders....if they are specific then you need to troubleshoot to the point of you being able to map them from any computer regardless of who logs on or what domain they belong to. basically if you can't map it with a computer in a workgroup of boohoo with a user name of noway, then it won't work. As you server put to you nicely, go pound sand. you may have to put in user credentials to gain access to those drives even if they are "open" or "unrestricted".

if you disable ipv6 properly, you wouldn't have that issue. it is done in the registry, not by simply unchecking it.

http://support.microsoft.com/kb/929852

as per the kb linked to:

  Quote
Note Unchecking the checkbox on a network adapter will not disable IPv6 on the host.
  On 26/06/2012 at 19:05, sc302 said:

what do you see in the event logs? also what rights are assigned to those folders....if they are specific then you need to troubleshoot to the point of you being able to map them from any computer regardless of who logs on or what domain they belong to. basically if you can't map it with a computer in a workgroup of boohoo with a user name of noway, then it won't work. As you server put to you nicely, go pound sand. you may have to put in user credentials to gain access to those drives even if they are "open" or "unrestricted".

if you disable ipv6 properly, you wouldn't have that issue. it is done in the registry, not by simply unchecking it.

http://support.microsoft.com/kb/929852

as per the kb linked to:

Hey, just tweaked the script to include an authenticated Domain Username and Password and it worked fine.

As below:

net use Z: \\server\share1 /user:[Logon Server]\[User Name] [Password] /persistent:yes[/CODE]

As long as the service now works without having a user logged in then everything is great :)

Regarding IPv6, Budman disabled it, blame him ;) And yes, he disabled it via the registry as it was supposed to be. Upon removing the registry tweak it's come back up as normal. Not sure whats causing it, either way added both dc.44kenlane.com and dc to the hosts file with IPv4 lookup.

"Yeah, was due to disabling IPv6 on the Server."

What are you trying to blame on the non use of IPv6?? That sure has nothing to do with your resolving a netbios unc call like \\server1

And your not using ipv6, so why or how could you possible point to an IPv6 dns? You have NO use of IPv6 -- do you?? Then if no then yes you can and to be honest it should be disabled.

Security 101, protocols and services that you are not using should not be enabled!

"But the Server takes 10-times longer to boot with IPv6 turned off"

BS - plain and SIMPLE BS!!

Going to test this right now.. Simple since its one command to turn it on or off.

Ok, I got side tracked at work - and then drove home had some dinner. Had a few minutes free before watching hells kitchen with the wife.

So 2k8r2 running on a vm -- what it runs on is meaningless for this test.

So I grabbed the sdk, so I could use xbootmgr and get traces of boot time.

So as you can see it was setup for ipv4 only

post-14624-0-25040400-1340756869.png

Ok then ran

xbootmgr -trace boot -numRuns 3

The changed over to back to having ipv6 deafault out of the box

post-14624-0-57995200-1340756886_thumb.p

So here are 2 traces done - notice the locations of the files. One was done with ipv4, other was with ipv6

post-14624-0-70420000-1340756877_thumb.p

So does that look like 10X boot up time to you??

Like I said BS!! Where did you get such an idea?? BTW -- the slightly!! I mean slightly faster in these tests was ipv4 ;) I would guess your going to see fluctuations in these numbers, I did - but for such a bone head statement I am not going to do a 10 run with averages, etc. I just grabbed the 3rd run of each test, -numRuns 3 remember.

I would suggest you do the test yourself -- run it 100 times each if you want. When you see even a 2x difference in boot - please post the trace for us to look at!

You can grab the sdk so you can get xbootmgr here

http://www.microsoft...ls.aspx?id=3138

You only need the 32bit developer tools to get the wpt_x64.msi which is what you need for 2k8r2, or if you want it like 16MB I could send it too you. And you can do your own tracing with ipv6 on and off, etc.

Now if yours is taking even say 1.5x longer -- then you got something wrong that is for sure!

Like I said, I'll diagnose this properly when I have time. Upon further inspection it may have something to do with my testing of Server 2012 as a DC and joining this Forest.

This Server will only get rebooted when ESXi gets rebooted, so I really don't care that it's taking so long to start with or without IPv6. Besides, this thread was to tackle a different issue, which I have since resolved. I believe you still have VPN access if you want to diagnose this yourself.

Have not even looked at 2012 yet, have no idea what bone head **** they did now playing with a protocol that is not quite ready for prime time. I would hope you have the ability to turn it off in 2012 as well.

Your really not going to see ipv6 mainstream for years and years. I doubt it will be even close to mainstream before end of life of 2012 server.

It could have something to do with ipv6 brokenness, yes that is a real term ;) Has to do with the selection of ipv6 over ipv4 when maybe ipv6 is a bad choice because its a tunneled connection or not quite working right in a dual stack setup.

Diagnosed the issue, when enabling IPv6 it forces communication with Server 2012 over said protocol and disables IPv4 comms. This breaks a few services on Server 2008. When I demoted the Server 2012 box from the Domain as a DC the boot time went back to normal in 2008.

Weird....

  On 29/06/2012 at 18:24, BudMan said:

So MS did the correct thing? Ipv6 is disabled by default in 2012?

No, in an AD environment with Server 2012 IPv6 is forced by default, you cannot disable it, in joining the 2012 server to the 2008 server it forced all comms on 2008 to run over IPv6, which was disabled in the registry, causing the processes to show 'no network connection'. Hence why when I re-enabled IPv6 on the 2008 box it began to work correctly again.

Solution was to demote the 2012 Server as a DC, this allowed the 2008 server to resume using the IPv4 protocol.

All in all, serves me right for using beta software.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.