Samba share & Windows drive letter

Link to this post 10 Mar 10

I'm 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)

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


Link to this post 10 Mar 10

If I recall how this worked under windows, correctly, statically assigning drive mappings to a shared drive is done in a registry key on the individual machines. I suppose this could be done using a "group policy", but I'm not 100% if you can push a group policy with Samba.

Link to this post 10 Mar 10

looks like samba 4 will let you pusha group policy ... you may find your answer here:

Link to this post 10 Mar 10

Ok, so from the Linux-side it looks like there's no way to restrict the drive letters assigned to samba shares. (I'm using Samba 3.2.5)

On the Windows side however I tested with the following:

net use H: \\test\home\pickup
net use /persistent:yes

After executing the above commands a new Registry Key was created:


I know it won't prevent users from mounting it in whatever path they want, but at least the samba share will always get automounted in a fixed drive letter.

BTW, sorry if this thread is starting to look a little Windows-ish. :P... I just put the Windows commands in the hope to help someone who is asking the same question around the internetz.

Thanks all for your help, I thought I could fix this from the Linux box but your replies put me in the right direction.

Thanks again.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board