如何从 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 家庭工作组 > 工作组 > 计算机 并输入用户名和密码。

要挂载共享,请使用 Samba 客户端:

smbclient //ComputerName/ShareName -U Username

参考文献(即使内容并不全部适用于此处):

相关内容