How to make Windows auto-login to network shares upon a reboot

October 20th, 2008 Categories: General


Running a Linux file server, without it being a Domain Controller on a Windows network has it’s own set of “pit falls” One of the most annoying problems, is that of mapped network shares, and not being able to automatically logging in once Windows has rebooted.

So, currently a Windows user needs to manually login to the mapped network drive everytime Windows was shutdown, or rebooted.

Here’s a quick a dirty trick to automatically log the user in, without them having todo anything themselves.

Right click on the “Windows Menu”, and click on “Explore” – this will explore you to the C:\Documents and Settings\{username}\Start Menu. Now double click on Programs > Startup. Click on File > New > Text Document, and create a file called shares. Now, double click on this file to edit it in NotePad, and add the following:

[sourcecode language='bash']
@echo off
net use x: \\{server}\{share1} /USER:{username} {password} /persistent:yes
net use y: \\{server}\{share2} /USER:{username} {password} /persistent:yes
net use z: \\{server}\{share3} /USER:{username} {password} /persistent:yes
exit
[/sourcecode]

P.S. Replace the following items with your own values:
{server} = the server, or computer which has the shares, for example \\computer or \\dean or \\pete
{share} = the share on the server, for exampe \music or \games or \data
{username} = the username for the share
{password} = the password for the share.

NOTE: If there’s no username, but just a password, you can ommit the /USER:{username} part

Tags:
No comments yet.
You must be logged in to post a comment.