如何從 MS-DOS 電腦掛載 CIFS 共享

如何從 MS-DOS 電腦掛載 CIFS 共享

我使用 2 台 MS-DOS 電腦 + 1 台 Windows 7 電腦 + 1 台 Raspberry Pi 透過乙太網路連接到 Cisco 路由器。我可以輕鬆地在 wWindows 電腦中映射 DOS 共享資料夾,\\DOSMCJB\DAT命令將在 Windows 中映射驅動器,沒有任何問題。

以下是我嘗試在 Raspberry Pi 上掛載共用資料夾的一些選項

為了獲得 NetBIOS 名稱的 ping,我已更改/etc/nsswitch.conf

hosts: files mdns4_minimal [NOTFOUND=return] dns

將該行更改為:

hosts: files mdns4_minimal [NOTFOUND=return] dns wins mdns4

已安裝

sudo apt-get install winbind libnss-winbind

然後我就可以透過 NetBIOS 名稱 ping 通了。

我在 /etc/samba/smb.conf 檔案中添加了一些參數,編輯:

; interfaces = lo eth0
; bind interfaces only = no
# Global parameters
[global]
    client max protocol = NT1
    log file = /var/log/samba/log.%m
    logging = file
    map to guest = Bad User
    max log size = 1000
    name resolve order = lmhosts bcast host wins
    obey pam restrictions = Yes
    pam password change = Yes
    panic action = /usr/share/samba/panic-action %d
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    passwd program = /usr/bin/passwd %u
    server role = standalone server
    unix password sync = Yes
    usershare allow guests = Yes
    wins support = Yes
    idmap config * : backend = tdb


[homes]
    browseable = No
    comment = Home Directories
    create mask = 0700
    directory mask = 0700
    valid users = %S


[printers]
    browseable = No
    comment = All Printers
    create mask = 0700
    path = /var/spool/samba
    printable = Yes


[print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers

smbtree命令顯示

WORKGROUP
    \\RASPBERRYPI           Samba 4.9.5-Debian
        \\RASPBERRYPI\IPC$              IPC Service (Samba 4.9.5-Debian)
        \\RASPBERRYPI\print$            Printer Drivers
    \\WINDOWSPC             
    \\DOSMCJA               MS-DOS Peer Server 
    \\DOSMCJB               MS-DOS Peer Server 

smbclient -L DOSMCJB命令顯示

Enter WORKGROUP\pi's password: 
tree connect failed: NT_STATUS_UNSUCCESSFUL

nslookup DOSMCJB命令顯示

Server:     192.168.0.1
Address:    192.168.0.1#53

** server can't find DOSMCJB: NXDOMAIN

在下面的安裝命令中我得到mount error(104): connection reset by peer

sudo -i mount -t cifs -o rw,netbiosname=DOSMCJA,user=username,guest,vers=1.0 //DOSMCJA/DAT /home/pi/myDOSMA/DOSMA

我已經改變了vers=3.0我得到mount error(112): Host is down

sudo -i mount -t cifs -o rw,netbiosname=DOSMCJA,user=username,guest,vers=1.0 //DOSMCJA/DAT /home/pi/myDOSMA/DOSMA

我已停用ufw狀態顯示為非活動狀態

sudo ufw disable

nmap DOSMCJA命令給我。

Starting Nmap 7.70 ( https://nmap.org ) at 2020-03-17 22:55 IST
Nmap scan report for DOSMCJB (10.9.12.20)
Host is up (1.7s latency).
Not shown: 983 filtered ports
PORT     STATE  SERVICE
25/tcp   closed smtp
110/tcp  closed pop3
111/tcp  closed rpcbind
113/tcp  closed ident
135/tcp  closed msrpc
139/tcp  open   netbios-ssn
143/tcp  closed imap
199/tcp  closed smux
256/tcp  closed fw1-secureremote
995/tcp  closed pop3s
1025/tcp closed NFS-or-IIS
1720/tcp closed h323q931
1723/tcp closed pptp
3306/tcp closed mysql
3389/tcp closed ms-wbt-server
6123/tcp closed backup-express
8080/tcp closed http-proxy

Nmap done: 1 IP address (1 host up) scanned in 281.58 seconds

安裝winbind後139埠就開啟了。

請幫我從 MS-DOS 對等伺服器掛載共用。如果需要任何其他詳細信息,請告訴我。

答案1

在 FreeDOS 中,使用以下指令定義共用:

net start server
NET SHARE sharename=local path

例如,以下命令將myshare 在目錄上建立一個名為 的共用C:\SHARE

net share myshare=C:\SHARE

myshare您可以透過網路查看共享,甚至可以在本地安裝它。

例如使用 Konqueror,按一下 網路資料夾 > Samba 共用 > Windows Home 工作群組 > 工作群組 > 電腦 並輸入使用者名稱和密碼。

若要掛載共享,請使用 Samba 用戶端:

smbclient //ComputerName/ShareName -U Username

參考文獻(即使內容並非全部適用於此處):

相關內容