クライアントがCIFSリモートSAMBA共有をローカルにマウントしようとしたときにエラーが発生しました:「マウントエラー(2):そのファイルまたはディレクトリはありません」

クライアントがCIFSリモートSAMBA共有をローカルにマウントしようとしたときにエラーが発生しました:「マウントエラー(2):そのファイルまたはディレクトリはありません」

cifsを使用してローカルでリモートのSamba共有をマウントしようとすると、Ubuntuクライアントにマウントエラーが発生する理由を誰が教えてもらえますか?ネットワーク経由でクライアントファイルエクスプローラのすべての共有にアクセスできますが、ローカル共有をマウントすることはできません。理由をご存知ですか?すべての設定がここに表示されます。


間違い:

mount -a
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

ubuntu@client:/# cat /etc/fstab 

//192.168.3.1/comercial   /mnt/comercial   cifs    rw,username=marta,password=Passw0rd,uid=1005,gid=1005    0   0
//192.168.3.1/it    /mnt/it cifs    rw,username=marta,password=Passw0rd,uid=1005,gid=1005   0   0

ubuntu@client:/mnt# ll
total 40
drwxr-xr-x 10 root  root  4096 dez 12 21:57 ./
drwxr-xr-x 20 root  root  4096 out  3 14:58 ../
drwxrwx---  2 marta marta 4096 dez 12 17:41 comercial/
drwxrwx---  2 marta marta 4096 dez 12 17:41 it/

root@server:/# cat /etc/fstab (Permanent mount on Server)
# /etc/fstab: static file system information.

#HDD3
/dev/disk/by-uuid/2868d2bf-d1d4-495e-90e3-63f0b04f8027  /mnt/hddextra/contabilidade ext4    rw  0   0
/dev/disk/by-uuid/b98fe068-526b-4f87-b392-2ce93ebebadd  /mnt/hddextra/logistica ext4    rw  0   0
/dev/disk/by-uuid/33d55b1b-7ecc-44ad-a02a-b3016652c2ef  /mnt/hddextra/comercial ext4    rw  0   0
/dev/disk/by-uuid/3b7d60f4-e089-454f-9df2-a0e5da79cd2e  /mnt/hddextra/it    ext4    rw  0   0
/dev/disk/by-uuid/42046503-c958-432c-9a4f-74781c13f4e6  /mnt/hddextra/administracao ext4    rw  0   0

root@server:/mnt# lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
├─sda1                      8:1    0    1M  0 part 
├─sda2                      8:2    0    1G  0 part /boot
└─sda3                      8:3    0   19G  0 part 
  └─ubuntu--vg-ubuntu--lv 253:0    0   19G  0 lvm  /
├─sdc1                      8:33   0  205M  0 part /mnt/hddextra/contabilidade
├─sdc2                      8:34   0  205M  0 part /mnt/hddextra/logistica
├─sdc3                      8:35   0  205M  0 part /mnt/hddextra/comercial
├─sdc4                      8:36   0  205M  0 part /mnt/hddextra/it
└─sdc5                      8:37   0  202M  0 part /mnt/hddextra/administracao

root@server:/mnt# ll /mnt/hddextra/
total 32
drwxr-xr-x 7 samba         samba         4096 Dec 12 22:14 ./
drwxr-xr-x 6 root          root          4096 Dec 12 21:39 ../
-rw-r--r-- 1 root          root          1024 Dec 12 22:14 .pdbedit.swp
drwxrwx--- 3 administracao administracao 4096 Dec 12 16:14 administracao/
drwxrwx--- 3 comercial     comercial     4096 Dec 12 16:14 comercial/
drwxrwx--- 3 contabilidade contabilidade 4096 Dec 12 16:14 contabilidade/
drwxrwx--- 3 it            it            4096 Dec 12 16:14 it/
drwxrwx--- 3 logistica     logistica     4096 Dec 12 16:14 logistica/

root@server:/# smbclient -L 192.168.3.1
Enter CET53\root's password: 

    Sharename       Type      Comment
    ---------       ----      -------
    print$          Disk      Printer Drivers
    publica         Disk      Partilha publica
    privada         Disk      Partilha privada
    contabilidade   Disk      Partilha Contabilidade
    logistica       Disk      Partilha Logistica
    comercial       Disk      Partilha Comercial
    it              Disk      Partilha it
    administracao   Disk      Partilha Administracao
    IPC$            IPC       IPC Service (cet53server server (Samba, Ubuntu))
SMB1 disabled -- no workgroup available

================================================== =========

smb.conf: (クライアントに共有がインストールされていません.)

[administracao]
comment = Partilha Administracao
browseable = yes
path = /mnt/hddextra/administracao
guest ok = no
read only = yes
valid users = @administracao
write list = rita, mario
force group = administracao
#force user = empresa
force create mode = 0770
security mask = 0770
create mask = 0770
directory mask = 0770

================================================== =

[global]

   workgroup = CET53
   server string = %h server (Samba, Ubuntu)

#### Networking ####

;   interfaces = 127.0.0.0/8 eth0   
;   bind interfaces only = yes

#### Debugging/Accounting ####

   log file = /var/log/samba/log.%m
   max log size = 1000
   logging = file
   panic action = /usr/share/samba/panic-action %d


####### Authentication #######

   server role = standalone server
   obey pam restrictions = yes
   unix password sync = yes.
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user

########## Misc ###########

   usershare allow guests = yes

===========================================

(All the users belong to the right groups)



(Last 2 log lines of /var/log/samba/log.«clientmachine»

[2020/12/13 17:25:17.161291,  0] ../../lib/param/loadparm.c:800(lpcfg_map_parameter)
  Unknown parameter encountered: "security mask"
[2020/12/13 17:25:17.161319,  0] ../../lib/param/loadparm.c:1859(lpcfg_do_service_parameter)
  Ignoring unknown parameter "security mask"



 ===================================================================
    


      Again, all is fine when browsing directories on network file explorer:
 smb://192.168.3.1
Except client won´t mount shares locally with cifs.

 
    
    The following lines are an mounting attempt with a Debian machine:
    (It gives a different error)

marco@debian:~# mount -t cifs //192.168.3.1/it /mnt/it
Password for root@//192.168.3.1/it:  ********
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


The following lines are a mounting attempt with ubuntu client:

Password for root@//192.168.3.1/contabilidade/: 
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
Password for root@//192.168.3.1/logistica/:  ********                
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

ベストアンサー1

答えを見つけました。サーバーのポート445が閉じています。それは本当にクレイジーです...ポート137、138、139、および«443»(https)が何らかの理由で開いています。

おすすめ記事