Community discussions

MikroTik App
 
lejsetad
just joined
Topic Author
Posts: 2
Joined: Fri Nov 29, 2024 2:37 pm

Turning off default SMB and DLNA

Fri Nov 29, 2024 2:42 pm

Hi,
I'm an owner of HAP ax3 device. I've connected a USB disk to the router. I share a few folders on that disk as SMB shares and I'm using one folder as a media share. However, there's one default samba share one media share that are both linked to the root of the disk. They are both marked as dynamic, so I cannot remove nor edit them. How do I turn them off? Thank you
 
mszru
Frequent Visitor
Frequent Visitor
Posts: 95
Joined: Wed Aug 10, 2016 10:42 am

Re: Turning off default SMB and DLNA

Fri Nov 29, 2024 5:12 pm

Hi,
In Winbox open System => Disks => Settings and uncheck Auto SMB Share and Auto Media Share parameters.
or
In CLI run
/disk/settings/set auto-smb-sharing=no auto-media-sharing=no 
 
lejsetad
just joined
Topic Author
Posts: 2
Joined: Fri Nov 29, 2024 2:37 pm

Re: Turning off default SMB and DLNA

Fri Nov 29, 2024 6:13 pm

Thanks for the tip, but it didn't help. I've also rebooted the router after disabling both, but nothing changed. Any ideas why?
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 4441
Joined: Sun May 01, 2016 7:12 pm
Location: California
Contact:

Re: Turning off default SMB and DLNA

Fri Nov 29, 2024 7:36 pm

I would have thought that would have worked...

You can also be explicit to disable SMB:
/ip/smb/set enabled=no
(the default is "auto" AFAIK ... but I'd thought the /disk auto-smb-sharing=no mean auto in /ip/smb be =no)
 
Backward4964
just joined
Posts: 3
Joined: Sat Dec 14, 2024 6:28 pm

Re: Turning off default SMB and DLNA

Sat Dec 14, 2024 6:40 pm

I'm facing the same issue:
Set:
/disk/settings/set auto-smb-sharing=no auto-media-sharing=no 
But I still have the whole usb2 shared by default while I would like to expose only usb2/share:
ip/smb/shares/print
0  X*  pub    pub         no                             
1    r share  usb2/share  no                  guest      
2 D    usb2   usb2        no                  guest

ip/smb/print
enabled: yes
status: enabled
domain: MSHOME
comment: MikrotikSMB
interfaces: brg-lan
I'm hosting also 2 containers on that usb2 drive and would like to avoid exposing all the config files over SMB

Did you manage to find a solution to remove the whole usb drive from the SMB share and leave exposed only specific folders on the drive?
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 4441
Joined: Sun May 01, 2016 7:12 pm
Location: California
Contact:

Re: Turning off default SMB and DLNA

Sun Dec 15, 2024 4:01 am


Set:
/disk/settings/set auto-smb-sharing=no auto-media-sharing=no 
[...]
ip/smb/print
enabled: yes
status: enabled
domain: MSHOME
comment: MikrotikSMB
interfaces: brg-lan
Did you try /ip/smb/set enabled=no or /ip/smb/set enabled=auto ?
 
strobber
just joined
Posts: 2
Joined: Sat Dec 21, 2024 3:13 pm

Re: Turning off default SMB and DLNA

Sat Dec 21, 2024 3:22 pm

I have the same problem on my AX3 (7.16.2) - the default SMB share and DLNA server for the usb1 root are still accessible after disabling them in System->Disk->Settings. Has anyone finally solved this problem?
 
Backward4964
just joined
Posts: 3
Joined: Sat Dec 14, 2024 6:28 pm

Re: Turning off default SMB and DLNA

Mon Dec 23, 2024 4:03 pm


Set:
/disk/settings/set auto-smb-sharing=no auto-media-sharing=no 
[...]
Did you try /ip/smb/set enabled=no or /ip/smb/set enabled=auto ?
Yes tried all options:
- no -> SMB files are not accessible
- auto/yes -> enable SMB, but shares the whole USB drive.
 
Backward4964
just joined
Posts: 3
Joined: Sat Dec 14, 2024 6:28 pm

Re: Turning off default SMB and DLNA

Mon Dec 23, 2024 5:44 pm

A possible solution:
set
disk/set usb2 smb-sharing=no
(replace usb2) with the drive id that you want to disable. Then in the IP/SMB settings add only the folder you would want to share in Shares.
 
strobber
just joined
Posts: 2
Joined: Sat Dec 21, 2024 3:13 pm

Re: Turning off default SMB and DLNA

Thu Dec 26, 2024 12:15 am

A possible solution:
set
disk/set usb2 smb-sharing=no
(replace usb2) with the drive id that you want to disable. Then in the IP/SMB settings add only the folder you would want to share in Shares.
This solution really works for me. Thanks a lot!