与类似的问题不同,我什至无法与smbclient连接。
samba共享在Windows中可以正常工作,并且可以自动运行,但是在Linux中,我根本无法安装它,并且错误消息充其量是神秘的。这是我的samba.conf:
[global]
dos charset = CP437
netbios name = REDACTED
server string = Lab
server role = standalone server
map to guest = Bad User
obey pam restrictions = Yes
smb passwd file = /var/etc/private/smbpasswd
private dir = /var/etc/private
max log size = 51200
server min protocol = SMB2
time server = Yes
deadtime = 15
max open files = 11070
hostname lookups = Yes
load printers = No
printcap name = /dev/null
disable spoolss = Yes
dns proxy = No
pid directory = /var/run/samba
panic action = /usr/local/libexec/samba/samba-backtrace
idmap config * : backend = tdb
acl allow execute always = Yes
create mask = 0666
directory mask = 0777
directory name cache size = 0
kernel change notify = No
map archive = No
map readonly = no
store dos attributes = Yes
strict locking = No
[common]
comment = Lab Common share
path = /mnt/pool/common
read only = No
inherit acls = Yes
hosts allow = XXX.XXX.XX.X/24, XXX.XX.XX.X/24 <-- redacted
hide dot files = No
veto files = /.snap/.windows/.zfs/
vfs objects = zfsacl, streams_xattr, aio_pthread
zfsacl:acesort = dontcare
nfs4:chown = yes
nfs4:acedup = merge
nfs4:mode = special
recycle:subdir_mode = 0700
recycle:directory_mode = 0777
recycle:touch = yes
recycle:versions = yes
recycle:keeptree = yes
recycle:repository = .recycle/%U
错误消息是:
[as@localhost ~]$ sudo mount -t cifs -o username=removed,password=removed //server.ip.address/common /media/windowsshare/
mount error(95): Operation not supported
完全没用的消息。
启用调试的dmesg:
[237179.795551] fs/cifs/cifsfs.c: Devname: //132.239.27.172/common flags: 0
[237179.795563] fs/cifs/connect.c: Username: lauria
[237179.795565] fs/cifs/connect.c: file mode: 0x1ed dir mode: 0x1ed
[237179.795600] fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 44 with uid: 0
[237179.795600] fs/cifs/connect.c: UNC: \\132.239.27.172\common
[237179.795605] fs/cifs/connect.c: Socket created
[237179.795606] fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x1b58
[237179.795897] fs/cifs/fscache.c: cifs_fscache_get_client_cookie: (0xffff8803e0aa4800/0xffff880035d25580)
[237179.795898] fs/cifs/connect.c: Demultiplex PID: 25817
[237179.795902] fs/cifs/connect.c: CIFS VFS: in cifs_get_smb_ses as Xid: 45 with uid: 0
[237179.795903] fs/cifs/connect.c: Existing smb sess not found
[237179.795907] fs/cifs/cifssmb.c: Requesting extended security.
[237179.795910] fs/cifs/transport.c: For smb_command 114
[237179.795912] fs/cifs/transport.c: Sending smb: smb_len=78
[237179.801062] fs/cifs/connect.c: RFC1002 header 0x25
[237179.801067] fs/cifs/misc.c: checkSMB Length: 0x29, smb_buf_length: 0x25
[237179.801090] fs/cifs/transport.c: cifs_sync_mid_result: cmd=114 mid=1 state=4
[237179.801093] fs/cifs/cifssmb.c: Dialect: 65535
[237179.801094] fs/cifs/cifssmb.c: negprot rc -95
[237179.801097] fs/cifs/connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 45) rc = -95
[237179.801100] fs/cifs/fscache.c: cifs_fscache_release_client_cookie: (0xffff8803e0aa4800/0xffff880035d25580)
[237179.801262] fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 44) rc = -95
[237179.801263] CIFS VFS: cifs_mount failed w/return code = -95
我尝试了许多不同的-sec
选项-都失败了,所有内容都有相同的错误消息。smbclient也无济于事:
smbclient //132.239.27.172/common -U username%password
protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE
这在Windows上如何工作,而在Linux上却根本不工作?
vers=3.0
没用,但是vers=3.02
做了,谢谢。