클라이언트에서 CIFS 원격 SAMBA 공유를 로컬로 마운트하려고 할 때 오류 발생: "마운트 오류(2): 해당 파일 또는 디렉터리가 없습니다."

클라이언트에서 CIFS 원격 SAMBA 공유를 로컬로 마운트하려고 할 때 오류 발생: "마운트 오류(2): 해당 파일 또는 디렉터리가 없습니다."

cifs를 사용하여 로컬로 원격 삼바 공유를 마운트하려고 할 때 우분투 클라이언트에 마운트 오류가 발생하는 이유를 누가 말해 줄 수 있습니까? 네트워크를 통해 클라이언트 파일 탐색기의 모든 공유에 액세스할 수 있지만 로컬 공유를 탑재할 수는 없습니다. 이유를 아시나요? 모든 구성이 여기에 표시됩니다.


실수:

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)이 어떤 이유로 열려 있습니다.

관련 정보