OpenWrt mount USB storage device for Samba sharing

Source: Internet
Author: User

No USB interface Router is not a good router, with the USB interface OpenWrt can play more, such as Mount USB stick, mobile hard disk and other USB storage devices to realize samba sharing, to create a small home server.

1. Install USB-related packages:

opkg updateopkg Install Kmod-usb-core kmod-usb-ohci kmod-usb-uhci kmod-usb2 kmod-ledtrig-usbdev usbutilsopkg Install Kmod-usb-storage kmod-usb-storage-extras block-mountopkg Install kmod-fs-ext4opkg install Kmod-fs-ntfs ntfs-3gopkg Install kmod-fs-vfatopkg install kmod-nls-cp437 kmod-nls-iso8859-1 kmod-nls-utf8reboot

2. Edit the configuration file to automatically mount the USB storage device:

Vi/etc/config/fstab

To add a device that needs to be mounted:

Config mount        option enabled ' 1 '        option target '/mnt/sda1 '        option device '/dev/sda1 '        option Fstype ' Ext4 ‘

3, set to boot:

/etc/init.d/fstab Enable/etc/init.d/fstab Start

4. Install Samba:

opkg updateopkg Install Samba36-server Luci-app-samba

5. Configure Samba:

Vi/etc/samba/smb.conf.template

Comment out this line

Invalid users = root

6. Set the boot to boot and access password:

/etc/init.d/samba Enable/etc/init.d/samba startsmbpasswd-a Root

7. Configure a directory to share with Samba:

Vi/etc/config/sambaconfig sambashare        option name ' Shares '        option path '/mnt/sda1/'        option read_only ' no ' C9/>option guest_ok ' no '

From:http://demon.tw/hardware/openwrt-usb-storage-samba.html

OpenWrt mount USB storage device for Samba sharing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.