
문제
CIFS를 통해 쉽게 마운트할 수 있는 NAS가 있지만 smbclient를 통해 액세스할 수는 없습니다. NAS 자체에는 거의 영향력이 없습니다. 방금 그곳에서 일련의 주식에 대한 허가를 받았습니다.
작동하는 것
fstab을 통한 마운트는 다음을 통해 완벽하게 작동합니다.
//nasname.local/someshare /mnt/someshare cifs credentials=/home/.cifs/cifscredentials,iocharset=utf8,dir_mode=0777,file_mode=0777 0 0
익명으로 로그인하면 smbclient
via를 통해 공유 목록을 나열할 수도 있습니다.smbclient -L //nasname.local/ -N
Anonymous login successful
Sharename Type Comment
--------- ---- -------
IPC$ IPC IPC Service (NAS Server)
Backup Disk
Public Disk System default share
Web Disk System default share
Reconnecting with SMB1 for workgroup listing.
Anonymous login successful
Server Comment
--------- -------
Workgroup Master
--------- -------
WORKGROUP xxx
작동하지 않는 것
smbclient //nasname.local/someshare -U username
이제 smbclient 와 비밀번호를 통해 NAS에 로그인할 때 동일한 자격 증명을 사용 하지만 응답을 받습니다.
Enter WORKGROUP\username's password:
tree connect failed: NT_STATUS_ACCESS_DENIED
그래서 문제가 무엇인지 알고 싶습니다. cifs-mount는 작동하지만 smbclient를 통한 연결은 작동하지 않습니다.
해결책 자세한 내용은 아래 참조
답변1
나는 이제 그것을 작동시킬 수있었습니다.
- 다음과 같이 파일에 자격 증명을 제공합니다.
username = my_user_name password = my_secret_password
- 을 통해 smbclient 호출
smbclient //nasname.local/Web -A /my/credentials/file
그리고 파일에서 사용하는 username
것이 아니라 user
(후자가 를 통해 마운트하는 경우 작동하더라도 sudo mount -t cifs
) 사용하는 것이 중요합니다.