Welcome to the Linux Foundation Forum!

Samba share & Windows drive letter

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.



  • gomer
    gomer Posts: 158
    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.
  • gomer
    gomer Posts: 158
    looks like samba 4 will let you pusha group policy ... you may find your answer here: http://wiki.samba.org/index.php/Samba4/HOWTO#Adding_organization_unit_.28OU.29_into_samba_4_domain
  • 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.


Upcoming Training