[Samba] Client access multiple shares with different usernames...

Modulok modulok at gmail.com
Thu Jan 3 13:12:50 MST 2013


List,

I have a FreeBSD box with samba and two shares '\\bsd\foo' and '\\bsd\bar'.
Each require a different password. (Different system user accounts and
different corresponding samba account.) They both work. The problem is that
from Windows 7 and windowsXP clients I can connect to '\\bsd\foo', but then I
can never connect to '\\bsd\bar' until I restart. Thereafter I can never
connect to '\\bsd\foo' until I restart... and so on.

Is there a way I can connect to multiple shares from the same client, using
different authentication for each share? For example, if I could put a username
in a UNC path that would solve everything:

    \\foo at hostname\some\resource

Any suggestions or links to examples would be great.

Thanks!
-Modulok-


Below is my test smb.conf file::

    # Begin smb.conf
    [global]
        smb ports = 139
        workgroup = MShome
        os level = 255
        domain master = yes
        local master = yes
        preferred master = yes
        wins support = yes
        name resolve order = wins bcast lmhosts
        server string = bsd
        netbios name = bsd
        hosts allow = 192.168.1.
        printcap name = /etc/printcap
        log file = /var/log/samba.log
        max log size = 1000
        socket options = TCP_NODELAY SO_KEEPALIVE SO_RCVBUF=17520
SO_SNDBUF=17520 IPTOS_LOWDELAY
        interfaces = 192.168.1.3/24
        guest account = public
        security = user
        map to guest = Bad User
        encrypt passwords = yes
        invalid users = root toor
        browseable = yes

        max disk size = 100000
            # Makes samba lie to stupid programs like photoshop, reporting
            # this (in megabytes) as the maximum volume size. This does
            # not limit the actual size of the volume, only the reported
            # size.

        create mask =  0644
        directory mask = 0755
        client NTLMv2 auth = yes

        null passwords = no
            # Allow or disallow client access to accounts that have
            # null passwords.

        unix extensions = no
            # Keep this off if you enable wide links. This is only used by
            # unix clients and is of no use to windows clients.

        wide links = yes
        follow symlinks = yes


    [foo]
        path  = /home/%S
        writable = yes
        guest ok = no
        hide dot files = yes


    [bar]
        path  = /home/%S
        writable = yes
        guest ok = no
        hide dot files = yes

    # End smb.conf


More information about the samba mailing list