国产宅男网站在线|亚洲A级性爱免费视频|亚洲中精品级在线|午夜福利AA毛

  • <dd id="gf5jf"><th id="gf5jf"></th></dd>

    <cite id="gf5jf"><label id="gf5jf"></label></cite>
  • <div id="gf5jf"><listing id="gf5jf"></listing></div>
    學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 電腦安全 > 局域網(wǎng)安全 > OpenWrt掛載U盤(NTFS)并在網(wǎng)上鄰居共享訪問

    OpenWrt掛載U盤(NTFS)并在網(wǎng)上鄰居共享訪問

    時間: 林澤1002 分享

    OpenWrt掛載U盤(NTFS)并在網(wǎng)上鄰居共享訪問

      剛買了能刷OpenWrt的路由器,設(shè)置個移動硬盤共享訪問就折騰了好久。下面是學(xué)習(xí)啦小編收集整理的OpenWrt掛載U盤(NTFS)并在網(wǎng)上鄰居共享訪問,希望對大家有幫助~~

      OpenWrt掛載U盤(NTFS)并在網(wǎng)上鄰居共享訪問

      工具/原料

      刷好OpenWrt(帶LuCI界面)的路由器一臺 當(dāng)然必須帶USB接口

      軟件:putty 用于命令行操作路由器

      軟件:WinSCP 用于修改路由器配置文件

      方法/步驟

      用putty連接路由器,用putty下載安裝所需的軟件包:(直接復(fù)制下面內(nèi)容到提示符)

      opkg update

      opkg install kmod-usb-core

      opkg install kmod-usb2 #安裝usb2.0

      opkg install kmod-usb-ohci #安裝usb ohci控制器驅(qū)動

      opkg install kmod-usb-storage #安裝usb存儲設(shè)備驅(qū)動

      opkg install kmod-fs-ext3 #安裝ext3分區(qū)格式支持組件

      opkg install kmod-fs-vfat #掛載FAT

      opkg install ntfs-3g #掛載NTFS

      opkg install mount-utils #掛載卸載工具

      opkg install block-mount

      opkg install luci-app-samba #SAMBA網(wǎng)絡(luò)共享服務(wù)

      /etc/init.d/samba enable #啟用并開始SAMBA共享

      /etc/init.d/samba restart

      注意 在線安裝軟件包需保證路由器Wan口可以連接Internet

      重啟路由器 登陸路由器設(shè)置界面 可以看到多了掛載點和網(wǎng)絡(luò)共享兩個選項(也可全部做完再重啟)

      用WinSCP連接路由器,打開/etc/hotplug.d/block/10-mount文件(如果不存在請新建)

      修改為如下內(nèi)容

      #!/bin/sh

      # Copyright (C) 2009 OpenWrt.org (C) 2010 OpenWrt.org.cn

      blkdev=`dirname $DEVPATH`

      if [ `basename $blkdev` != "block" ]; then

      device=`basename $DEVPATH`

      case "$ACTION" in

      add)

      mkdir -p /mnt/$device

      # vfat & ntfs-3g check

      if [ `which fdisk` ]; then

      isntfs=`fdisk -l | grep $device | grep NTFS`

      isvfat=`fdisk -l | grep $device | grep FAT`

      isfuse=`lsmod | grep fuse`

      isntfs3g=`which ntfs-3g`

      else

      isntfs=""

      isvfat=""

      fi

      # mount with ntfs-3g if possible, else with default mount

      if [ "$isntfs" -a "$isfuse" -a "$isntfs3g" ]; then

      ntfs-3g -o nls=utf8 /dev/$device /mnt/$device

      elif [ "$isvfat" ]; then

      mount -t vfat -o iocharset=utf8,rw,sync,umask=0000,dmask=0000,fmask=0000 /dev/$device /mnt/$device

      else

      mount /dev/$device /mnt/$device

      fi

      if [ -f /dev/${device}/swapfile ]; then

      mkswap /dev/${device}/swapfile

      swapon /dev/${device}/swapfile

      fi

      ;;

      remove)

      if [ -f /dev/${device}/swapfile ]; then

      swapoff /dev/${device}/swapfile

      fi

      umount /dev/$device

      ;;

      esac

      fi

      這段腳本可實現(xiàn)自動掛載,如不想編輯腳本,也可在掛載點中自己設(shè)置(PS.沒試過)

      插入U盤或移動硬盤 再次重啟路由器 在掛載點中就可以看到已經(jīng)掛載的設(shè)備

      如果U盤只有一個分區(qū),就是/mnt/sda1,第二個分區(qū)是/mnt/sda2

      如果用Hub接入多個U盤,第二個設(shè)備就是/mnt/sdb,以此類推

      進入網(wǎng)絡(luò)共享中,添加共享目錄例如/mnt/sda1,權(quán)限為777(即完全訪問)。

      至此就可以在網(wǎng)上鄰居中看到路由器的這個共享文件夾了。

      6注意XP系統(tǒng) 必須保證

      Computer Browser

      Server

      Application Layer Gatway Service

      Windows Firewall/Internet Connection Sharing

      這幾個服務(wù)開啟 并且在本地連接屬性中

      Microsoft 網(wǎng)絡(luò)的文件和打印機共享

      啟用時 網(wǎng)上鄰居文件才可以訪問


    網(wǎng)上鄰居共享訪問相關(guān)文章:

    1.WIN7訪問不了網(wǎng)上鄰居共享文件的解決方法

    2.WIN7怎樣在網(wǎng)上鄰居共享文件夾

    3.網(wǎng)上鄰居建立局域網(wǎng)的方法有哪些

    4.怎么通過網(wǎng)上鄰居看不到局域網(wǎng)中其它計算機

    5.xp局域網(wǎng)不能訪問網(wǎng)上鄰居的解決辦法

    6.局域網(wǎng)如何共享設(shè)置組

    7.局域網(wǎng)內(nèi)xp怎樣訪問win7共享的打印機共享

    8.win7網(wǎng)上鄰居怎么打不開其他電腦

    2913501