OpenWRT - File Sharing Server on OpenWRT with Samba4 (SMB)

Поделиться
HTML-код
  • Опубликовано: 21 июл 2024
  • In this video, we will configure File Sharing server on OpenWRT with Samba4 (SMB). For this tutorial, I used a USB 3.0 SSD (USB Attached SCSI device) and connected the hard disk to the USB 3.0 port on the Linksys WRT1900AC to achieve the highest file transferring speed. You can connect the hard disk to a USB 2.0 port but the speed is slower. Besides USB hard disk, a normal USB drive or USB printer will be supported by Samba.
    Since most of the tutorial on the internet is about Samba 3; I decided to make one for Samba 4. I hope it will help you to get the setup working.
    Video timeframe:
    00:00 - Intro
    01:35 - File Sharing with OpenWRT Router Procedure Overview
    02:18 - Install Packages - USB Storage, Block-Mount & NTFS support
    04:54 - Mont the USB hard drive on OpenWRT with Block-Mount
    06:03 - Install Samba4 Server with Putty (CLI)
    08:35 - Install luci-app-samba4 & configure Samba4 on LuCI
    08:57 - Configure Samba4 on LuCI
    11:14 - Create Samba user (Network driver user)
    14:56 - Map new Network Drive on Windows 10 & File transfering Speedtest
    16:44 - Connect to the Network Drive on Smartphone with Cx File Explore
    Resources:
    - Samba Configuration - openwrt.org/docs/guide-user/s...
    - USB Storage Drivers - openwrt.org/docs/guide-user/s...
    - NTFS Read & Write support - openwrt.org/docs/guide-user/s...
    - Block-Mount - openwrt.org/docs/techref/bloc...
    Thanks for watching and see you in the next video!
  • НаукаНаука

Комментарии • 111

  • @cblack2863
    @cblack2863 2 года назад +1

    This is perfect. I have been putting of installing Samba for so long.

  • @xenophone9222
    @xenophone9222 Год назад

    Great guide, worked on my WRT3200ACM on OpenWrt 22.03.2 with one change at the step where you're mounting /dev/sda I ran "ln -s /usr/bin/ntfs-3g /sbin/mount.ntfs" from terminal. This allowed the drive to mount when previously applying the enable option would result in no change. This step is at 5:41

  • @JohnnyLeuthard
    @JohnnyLeuthard 2 года назад +4

    My favorite part is at 15:07.
    Your videos are great by the way. Very helpful.

  • @niggle3138
    @niggle3138 2 года назад +1

    just spent 30m-1hr trying to get the permissions right by myself. Should have looked at your video first, got it done in 5min! Best tutorial on the internet!!

    • @Tech-px3yn
      @Tech-px3yn Год назад

      I followed everything and still I do not have read and write it says the system is write protected

  • @SachinGopalkrishnan
    @SachinGopalkrishnan 2 года назад +1

    This was easy and clear. Thank you.

  • @plica06
    @plica06 2 года назад +1

    This is a really useful video. Thank you for making it !!

  • @MdSiam-kw5ox
    @MdSiam-kw5ox 2 года назад

    Thanks for the tutorial man.
    U are awesome.

  • @MrMarconunes19
    @MrMarconunes19 Год назад

    Thank you!! finally i got it right by folowing your instructions!

    • @VanTechCorner
      @VanTechCorner  Год назад +1

      Glad it helped!

    • @MrMarconunes19
      @MrMarconunes19 Год назад

      @@VanTechCorner now its sharing a small disk instead of the usb external drive

  • @rifemhere2890
    @rifemhere2890 2 года назад

    now this is what ive been waiting for!! thankyou so much van 😆😆

    • @rifemhere2890
      @rifemhere2890 2 года назад

      btw, im using x86 openwrt and i want to share one of my folder in my hdd
      i hope its work

    • @rifemhere2890
      @rifemhere2890 2 года назад

      well, i want to share my ext4 on my harddrive but i cant make it work 😢

    • @rifemhere2890
      @rifemhere2890 2 года назад

      nvm its already work hehe 👌 thankyou once again

  • @CrUBlackNerd
    @CrUBlackNerd 2 года назад +1

    can you do one for ksmbd on openwrt? the package size is much smaller, and the luci interface is very similar.

  • @usaeabusa2453
    @usaeabusa2453 2 года назад +1

    Well done sir but do you have a video explaining how to setup a way to access the usb ssd from outside the home network?

  • @mobilemeneer3053
    @mobilemeneer3053 Год назад

    I have installed openwert on an zyxel nsa325 v2 yesterday and want to share an internal sata drive. Not an usb drive. Do you know if that's possible?

  • @pichonPoP
    @pichonPoP 2 года назад

    I face so many troubles in order to this work. Finally, the options that work for me "rw,nodev,noexec,noatime,nosuid,uid=xxxx,gid=xxxxx" By passing those options and special mention to uid and gid did the magic. They need to match your user. BTW, I'm using samba4

  • @rengreng4277
    @rengreng4277 Год назад

    I'm using samba for the local nas network, can the files on the HDD be accessed via luci or not?

  • @danzare5638
    @danzare5638 2 года назад

    Hello , I just installed the x86 EFI openwrt version 21.02.0 , just released a few days ago ,
    on a machine and then enlarged the partition as you do and it all went well and the system said it was successful ... however when booting it up the system would not boot all the way and give message ' waiting for root device PARTUUID ' wondering if this is due to EFI , this is the first time I have seen an EFI listed in the default stable versions
    Maybe there is another task that needs to be done , do you know what the cause and fix is .
    thanks for your help !

  • @massbib
    @massbib 2 года назад

    I'm having a problem.. I've followed the tutorial but my hdd can't be written, it can only be read.. what's wrong?

  • @DeusMalleus
    @DeusMalleus 2 года назад

    I'm stuck on the network drive mapping, I keep getting issues with certificates and nothing seems to work. Have you experienced this problem?

  • @CHeckmann
    @CHeckmann 2 года назад

    Can you please make another video toturial for ksmbd because samba a way to big for my WRT1900ACS. Can't install any update after using samba.

  • @portuguesechannel1761
    @portuguesechannel1761 Год назад

    how do you configure share without level user access I can't figure out

  • @mr_eser
    @mr_eser Год назад

    I have router without usb but i have modem with usb. How can i access to that usb on openwrt and add?

  • @rikka0_059
    @rikka0_059 Год назад

    If you use 1Gbps links between your router and PC, how fast can you get? I feel that the router becomes a bottleneck, even if you use a HDD

  • @ykwongtube
    @ykwongtube 2 года назад

    hello, I am running the OpenWrt 21.02 on the Linksys WRT32X and managed to install USB storage, Block-Mount and Samba4 following your video, but after installed the Luci-app-samba4, the new "Service" menu didn't show up. Appreciate if you can answer what I done wrong. stay safe!

  • @vivahitam5444
    @vivahitam5444 2 месяца назад

    Hii.. i just wonder can I access the file online, upload and download without connect with same WiFi?

  • @mlapastora
    @mlapastora 2 года назад

    I'm unable to copy large files. Saying there is not enough space on device but I have a 1TB HDD mounted on the router. Anyone who can help?

  • @sahilkaul4750
    @sahilkaul4750 2 года назад

    I have successfully configured the share and permissions. I can see that in windows and phone bit when I try to access I get access denied. All SAMBA Share username and password logs on also fine. still access denied

  • @ytgessle
    @ytgessle 11 месяцев назад

    Can't install on Dir842 right. I got not enough space error.

  • @BinaryOptimizer
    @BinaryOptimizer 2 года назад

    such a great vid :)
    keep it up

  • @utnhat3778
    @utnhat3778 2 года назад

    the share is not accessible ?

  • @welliopedrodelima4782
    @welliopedrodelima4782 2 года назад +1

    Excelente vídeo.
    Estou tentando instalar openwrt em um TP-Link 750n. Desejo instalar nele rclone, montar GoogleDrive como disco, local. Fazer com que seja montado automaticamente no boot. Com a flag --destiny ( -) do opkg, instalar os pacotes como openvpn, samba, ddns, Lucy nesse reclone montado. Porém estou com dificuldade para fazer com que o rclone já monte o disco no start

  • @asifrais8927
    @asifrais8927 8 месяцев назад

    ThankYou I installed the kmod packages and Ntfs 3G then Reboot now after rebooting my Belkin RT3200 is dead which I bought new Yesterday 😢

  • @iter68
    @iter68 Год назад

    My drive does not show up in Mounted file systems until I installed package "kmod-fs-ntfs" which did not mention in the video.

    • @VanTechCorner
      @VanTechCorner  Год назад

      Using kmod-fs-ntfs only provides read support while ntfs-3g provides both read & write support. You need to reboot the router after installed ntfs-3g. More info on the OpenWRT docs (links in video's description)

  • @dimcheg100
    @dimcheg100 10 месяцев назад

    Thank you

  • @andrecintra7284
    @andrecintra7284 2 года назад

    Excellent work this video!! Is possible make a video about config https on luci and proton vpn on openwrt 20?

  • @diwaportingrom
    @diwaportingrom 2 года назад

    what model of linksys you use on the video, bro?

  • @HartonoBangkir
    @HartonoBangkir Год назад

    not working , untill adding rule into firewall

  • @patricklee6508
    @patricklee6508 Год назад

    I just got myself an used WRT1900ac V2 to test drive openwrt. I'm new to linux and openwrt. I tried few different USB HDD and USB drive. Nothing seems to be working. I read some articles online saying if the drive is being detected it should show under the /dev. What is simplest way to determined the drive is working or not? Thanks.

    • @VanTechCorner
      @VanTechCorner  Год назад

      Hey, the easiest way is connect the device into your computer, go to Disk Management to verify that.

  • @thyagorodriguesalvarez5264
    @thyagorodriguesalvarez5264 Год назад

    thanks a lot :)

  • @nguijgitjiogdjiog
    @nguijgitjiogdjiog Год назад

    At 12:36 you say "press the exe keys and then columns and right click hit enter". I can't quite understand how to do that. What is the exe key?

    • @VanTechCorner
      @VanTechCorner  Год назад +1

      ESC. You can learn the basic of VI editor to understand how to edit a text file in Linux.

  • @thiefrainb0w99
    @thiefrainb0w99 2 года назад

    Thanks for the tutorial! How come samba wont let files/directories be named with a colon ( : ) ?

    • @a892728
      @a892728 2 года назад

      :Illegal Filename Characters

  • @Nazmul.Alam_
    @Nazmul.Alam_ 2 года назад +1

    Hello, My router doesn't have enough space to install samba4, is there any other package I can use to enable file sharing which lighter than samba4?

    • @a892728
      @a892728 2 года назад

      Does your router has USB port with it?

    • @Nazmul.Alam_
      @Nazmul.Alam_ 2 года назад

      @@a892728 Yes.

    • @a892728
      @a892728 2 года назад

      @@Nazmul.Alam_
      1.try extroot
      2.use chfs as http file server

  • @rifoevert3233
    @rifoevert3233 2 года назад

    hello, thanks for the great videos
    i already try it and it works, but when i restart my x86 openwrt it not want to connect, any suggest?

    • @VanTechCorner
      @VanTechCorner  2 года назад

      Hi, sorry for the late response. Did you solve the problem?

    • @rifoevert3233
      @rifoevert3233 2 года назад +1

      @@VanTechCorner hi, actually no
      so i just reinstall my openwrt and its work fine

  • @vinyht1723
    @vinyht1723 Год назад

    How to change User and Password

  • @HHX_H
    @HHX_H 2 года назад

    I have no ideea what you said after inserting new user

    • @VanTechCorner
      @VanTechCorner  2 года назад

      You can read the guide in the video description.

  • @bowwowrescue3622
    @bowwowrescue3622 Год назад +1

    I managed to get the drive to mount after some tries and succeeded in going through the tutorial. But when I upgraded my OpenWRT to 22.03.1, it deleted all the settings and I had to reinstall. This time I just can't get the drive to mount!! All drivers are installed and I can see the drive under Mount Points menu. So what didn't I do right?

    • @SteelTumbleweed
      @SteelTumbleweed Год назад

      I'm having the same problem.

    • @SteelTumbleweed
      @SteelTumbleweed Год назад

      I figured it out. I was missing the kmod-fs-ntfs package, which another commenter notes that it wasn't mentioned in the video. Good luck buddy!

    • @johnpang864
      @johnpang864 Год назад +1

      @@SteelTumbleweed thanks for the tip! Appreciate it!

    • @SteelTumbleweed
      @SteelTumbleweed Год назад +1

      @@johnpang864 I think there might be a legitimate bug on the latest version. By attempting to use kmod-fs-ntfs I get an access denied when attempting to access the drive. I found a workaround which is to manually mount the drive using just ntfs-3g, uninstalling kmod-fs-ntfs and going to ssh and typing in: ntfs-3g /dev/sda1 /mnt/sda1 -o rw,big_writes

    • @johnpang864
      @johnpang864 Год назад

      @@SteelTumbleweed OK thanks!

  • @tauqeerwaqas
    @tauqeerwaqas 2 года назад

    verify_pkg_installable: Only have 4912kb available on filesystem /overlay, pkg samba4-libs needs 7010
    * opkg_install_cmd: Cannot install package samba4-server.

    • @wisan66eni
      @wisan66eni 2 года назад

      same problem, altought i have 115mB free space it said i dont have space enough to install it

  • @amiruldaniel9081
    @amiruldaniel9081 2 года назад

    Sir..can we use this on the raspberry pi openwrt server? and can it work with usb printer?

    • @VanTechCorner
      @VanTechCorner  2 года назад +1

      Hi, you can surely use this with RPI running OpenWRT. Samba does support USB printer but I have yet to try. Maybe you can give a try and share the result.

    • @amiruldaniel9081
      @amiruldaniel9081 2 года назад

      @@VanTechCorner I see...thank you for your feedback..I'll share the result once I've try it

    • @a892728
      @a892728 2 года назад

      you can try printer with p910nd

  • @jordanwiliams6056
    @jordanwiliams6056 2 года назад

    It wont let me write from windows? It says i dont have permission

    • @VanTechCorner
      @VanTechCorner  2 года назад

      Hi, how about usin a phone? Did you enable write in Samba configuration. May I know what is the format of the USB device/ HDD that you are using?

  • @mohdzulhazmi5357
    @mohdzulhazmi5357 2 года назад

    Can i request for torrent install guide in openwrt 😅

  • @unixff108
    @unixff108 Год назад

    can i do it on r2s?

    • @VanTechCorner
      @VanTechCorner  Год назад

      Yes it will work just fine, as long as you can install the packages. However, the speed will be lower since R2S only has USB 2.0.

  • @johnpang864
    @johnpang864 Год назад

    Does this work with FAT32 and ExFAT formatted drives?

    • @VanTechCorner
      @VanTechCorner  Год назад

      For ExFat maybe it work, but fat32 doesn’t.

    • @johnpang864
      @johnpang864 Год назад

      @@VanTechCorner thanks for your reply. Is FAT32 possible and do you have a video on this, thank you.

    • @VanTechCorner
      @VanTechCorner  Год назад

      Hi, fat32 is not working with this kind of sharing.

    • @johnpang864
      @johnpang864 Год назад

      @@VanTechCorner ok thank you.

  • @johnweldon1932
    @johnweldon1932 2 года назад +1

    Too bad, looks like the samba4 packages might be too big for my router (~10mb max storage 😢). Great content!

    • @paulmaydaynight9925
      @paulmaydaynight9925 2 года назад +1

      you should still be able to remote mount a -ram- drive then use that as your bigger/extra home dir using sshfs perhaps.
      use a cheap pi4 -with usbc 8 in 1 USB C Hub Dongle with Ethernet ,sd cards etc- as a master openwrt then relegate your old router to a openwrt client.

    • @ItGuyTechTips
      @ItGuyTechTips 2 года назад +2

      If you have 2 or more usb ports you can use extroot to increase the storage and install whichever packages you need.

    • @johnweldon1932
      @johnweldon1932 2 года назад

      @@ItGuyTechTips @paul maydaynight both good options, thanks guys. It's a mobile setup, so I have the phone USB tethered through the router's single USB port. Maybe I can route the traffic through USB-to-Ethernet adapter, then hook an external drive through the USB 🤔

    • @ItGuyTechTips
      @ItGuyTechTips 2 года назад

      @@johnweldon1932 which exact router do you have?

    • @rikka0_059
      @rikka0_059 Год назад +1

      If you dont want to do extroot, there is a hard way, compile your own image and include samba packages. The filesystem in OpenWrt has two layers, one compressed read-only and one modifiable. Something in the latter layer takes tens of megabytes could be just a few megabytes in the former layer.

  • @waleedtaqi6445
    @waleedtaqi6445 8 месяцев назад

    are you on gigabit connection?

    • @VanTechCorner
      @VanTechCorner  8 месяцев назад

      At the time of making this video - no
      Now - yes, and sometime I get up to 2Gbps throughput. You can check out my recent videos :)

    • @waleedtaqi6445
      @waleedtaqi6445 8 месяцев назад

      @VanTechCorner i get 70mb/s max on gigabit with 5ghz wifi on ipad. but my phones wifi cant go past 433mbps on 5ghz. so the speed on phone is 25mb-ish something. even my phone supports AC wifi...on pc i get 110 mbps over smb and ftp.

  • @indethbed2546
    @indethbed2546 Год назад

    8:48 i have only 4.9 mb left - cannot continue any further

    • @indethbed2546
      @indethbed2546 Год назад

      ksmbd works as alt. to samb4

    • @indethbed2546
      @indethbed2546 Год назад

      using it as guest because it is a private network anyway and samba cmdlines and ksmbd cmdlines were different in password part... i am at my limits with the troubleshooting

    • @indethbed2546
      @indethbed2546 Год назад

      but yeah working. would like to automatically store screenshots there

    • @VanTechCorner
      @VanTechCorner  Год назад

      Thanks for the update bro! It is good that you solved the space limit problem.

  • @OntologicalQuandry
    @OntologicalQuandry 2 года назад

    Argh! This is so frustrating. OpenWRT don't allow ssh to the router if it's not its default 192.168.1.1, so your command line instructions are useless to me with my device connected into my network the way it is.
    I cant default it back because then it won't have internet access.
    Why on Earth Samba4 can't be installed from LuCI like Samba3.6 can, I cannot fathom (although I know why since the -libs dependency has shot up in size to 7.4MB for some reason...).
    Then, to have to use the command line to add users and passwords is such a frustrating oversight to the LuCI-app.
    So close and yet so far...
    Great instructional video, though.

  • @indethbed2546
    @indethbed2546 Год назад

    cannot mount... doesnt mount

  • @kingofsoq
    @kingofsoq 2 года назад

    tbh, i don't even know samba has reached version 4. 😌

  • @hiepphat519
    @hiepphat519 2 года назад

    tôi đã mất 3 tiếng để làm được :))😀😀

  • @flyinbrianewing
    @flyinbrianewing Год назад

    where did you paste this line? "newuser:*:1000:65534:newuser:/var:/bin/false" You completely lost me at this point. which key is EXE and Column?

    • @VanTechCorner
      @VanTechCorner  Год назад

      Hello, you better spend sometime to understand how to edit a text file with VI Editor using CLI.
      Use ESC to switch to Command Mode
      Use I to switch to Insert Mode
      :wq to Write & Quit
      www.cs.colostate.edu/helpdocs/vi.html

    • @flyinbrianewing
      @flyinbrianewing Год назад

      @@VanTechCorner I was using Putty and I'm an amateur with it too. I did get it working without a password. I have no classified documents on the drive so it's not too important to have a password.