March 9, 2010

Is it possible to setup a samba share to always mount to a specific Windows drive letter???

I am using Fedora with Samba. Is there a way to setup Samba in Linux so that every Windows machine that tries to connect to the share always gets it mounted under the same drive letter (e.g. H:)???

My Samba share (in smb.conf)
/home/pickup

I want that all Window users get it mounted under "H:" drive letter by default.

Thanks.

 

 

It sounds like an enterprise environment, so I would suggest going the logon...

It sounds like an enterprise environment, so I would suggest going the logon script route. Mapping drives manually on more than a couple machines can be very tedious.

Like  (0 likes)

In Windows, right click 'My Computer', select 'Map Network Drive', choose the...

In Windows, right click 'My Computer', select 'Map Network Drive', choose the drive letter you want (in your case H:), set the location to the Samba share and check the box that says reconnect on login.

Yeah, I forgot about that. KISS, if it is a small environment this is the easiest way.

BR
Mattias

Like  (0 likes)

In Windows, right click 'My Computer', select 'Map Network Drive', choose the...

In Windows, right click 'My Computer', select 'Map Network Drive', choose the drive letter you want (in your case H:), set the location to the Samba share and check the box that says reconnect on login.

Like  (0 likes)

Hi,...

Hi,

Network shares can't automatically be set to a drive letter assigned by the administrator if it is mounted manually by the user.

The best way to go is a login script which forces the share to be mounted with the drive letter.

The simplest way is to:
Open up Notepad in Windows and paste in the following:

@Echo Off
net use H: \\192.168.1.10\myshare

Replace the \\192.168.1.10\myshare with the path to your Samba share.

Save the file as "samba.bat" in "C:\Documents and Settings\All Users\Start Menu\Programs\Startup" for it to apply to all users on that computer. Be sure to use quotation marks in the file name, or your file will end up as "samba.bat.txt".

If it requires authentication you can add a switch:

@Echo Off
net use H: \\192.168.1.10\myshare /USER:myusername mypassword

Replace myusername and mypassword with your Samba username and password.

Note that this stores the password in clear text.

If the users should have separate login scripts you can place the file in the users own Autostart folder. "C:\Documents and Settings\\Start Menu\Programs\Startup"

Source: http://noobbox.com/2009/04/auto-mount-samba-share-ubuntu-and-windows

There is also a guide here, http://oreilly.com/catalog/samba/chapter/book/ch06_06.html, which gives a little more advanced options.

I hope this will help you on your way.

Best regards
Mattias

Like  (0 likes)
Click Here!