Setting up Samba Share for Win 11 via Webmin Samba Module

SYSTEM INFORMATION
OS type and version Ubuntu Linux 24.04.5
Virtualmin version 8.3.0 GPL

Have read the Samba documentation here however still having trouble accessing a created share that will be mapped as a network drive in Windows 11.

A few months back, I successfully created a share that was mapped as a network drive in Win 11.

I also recall the share configuration file edited manually had more ‘content’ than my current config:

  • I have set up the new user creation to add a Samba user
  • The share has read/write permissions
  • The share is a folder data in the user’s home directory
  • Password conversion reports ‘Already the same’
  • Guest access is set to No
  • Read/Write users is set to the Unix/Samba username
  • Unix/Samba user exists in Win 11
  • Username mapping matches

A couple of screenshots below. I feel pretty sure the Samba share is set up correctly; it’s the Win 11 that won’t connect to the share.

The mapping network drive connection box hangs for about 20 seconds and then requests the username/password again :smiling_face_with_tear:

2026-10-02 08_24_06-Map Network Drive

Any help appreciated :+1:

Here is a sample config that works very well with me:

# Reference doc:
#  https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html

[global]
# Parameters in this section apply to the server as a whole, or are defaults for sections that do not specifically define certain items. 
    smb encrypt = required
    disable netbios = yes
    server string = My Fav FileServer
    mangled names = no
    
    workgroup = WORKGROUP
    netbios name = FILESERVER

    max protocol = SMB3
    os level = 20
    security = user
    passdb backend = tdbsam
    restrict anonymous = 2

    admin users = root,makina
    encrypt passwords = true
    obey pam restrictions = yes
    pam password change = yes
    unix password sync = yes
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

    add user script = /usr/sbin/useradd -m '%u' -g users -G users
    delete user script = /usr/sbin/userdel -r '%u'
    add group script = /usr/sbin/groupadd '%g'
    delete group script = /usr/sbin/groupdel '%g'
    add user to group script = /usr/sbin/usermod -G '%g' '%u'

    guest account = nobody

    syslog = 0
    log file = /var/log/samba/samba.log
    max log size = 1000
    log level = 2

    wins support = yes
    dns proxy = no

    socket options = TCP_NODELAY
    panic action = /usr/share/samba/panic-action %d

    vfs object = recycle
    recycle:touch = yes
    recycle:keeptree = yes
    recycle:versions = yes
    recycle:exclude_dir = tmp quarantine


[makina]
	create mode = 0664
	directory mode = 3775
	force user = makina
	wide links = no
	valid users = makina,electric
	comment = Makina share
	writeable = yes
	browseable = no
	path = /mnt/makina

Of course, your requirements could be different, so maybe first try with this sample, ensure that it works, and then adjust little by little to your needs while testing each change..

Thanks for the reply and guidance.

I have managed to get it to work.

However, I suspect it’s actually an NFtables firewall issue underneath it all; the firewall doesn’t let me add the Samba service (which doesn’t appear in the bootup-shutdown module), so NFtables gives me a ‘service not found’ error.

On a separate note, I would love to see Webmin create a ufw module :smiley:

If I shutdown the firewall it connects and works as expected. Further investigation is therefore required :+1:

To the best of my knowledge, there is a ufw module in webmin. Make sure you have ufw installed, and then Refresh Modules in webmin.

Thankyou, you helped me out with the conf file you shared.

My actual issue is now resolved. I can connect to the shares as the user, and it ‘drops’ me into that user’s home directory, which is exactly what I wanted. I’ll mark this as a solution.

I was hoping you would mark my answer as the solution :sweat_smile:

I’m happy I could help :handshake:

May your input was not the full solution who knows or really cares do you really need your post as a solution? If so why ?

No, not really. Just begging for virtual credits :stuck_out_tongue:

You can use the webmin module for nftables to create these rules (in your input chain).

Start by creating a ‘Set’ for each protocol’s ports. That is, create a set ‘smb_udp’, type ‘inet_service’, containing 137,138; and a similar set ‘smb_tcp’ for the TCP ports 139, 445.

Next, create a rule in your ‘input’ chain with ‘accept’ action, your subnet (e.g. 192.168.1.0/24) in source address, protocol udp, and under destination port, use set, and choose smb_udp. Repeat for the tcp set.

Not all of these ports will be necessary if, for example, netbios is disabled in your environment. In which case, you should be okay just opening TCP port 445. So, instead of creating the 2 sets above create a single TCP set containing port 445.

while nftables is the successor to iptables , if you are running on RHEL firewalld is the correct choice to make commands.

https://www.youtube.com/watch?v=mu-UKKGBcN0&list=LL&index=20