smbj
smbj copied to clipboard
Connect to Apple Time Capsule
Do you know how to connect (and list files, ...) on a TimeCapsule? FYI Apple devices use both SMB and AFP. I can connect using my Mac easily (obviously), but using linux my /etc/fstab looks like
//<time_capsule_ip>/<share_name> <mount_point> cifs username=xxx,password=yyy,uid=zzz,sec=ntlm,vers=1.0
Only by specifying the security and vers will it work. Do you know how I can emulate that?
When I try this occurs in my log:
I/c.h.s.t.PacketReader: PacketReader error, got exception.
com.hierynomus.protocol.transport.TransportException: com.hierynomus.protocol.commons.buffer.Buffer$BufferException: Underflow
at com.hierynomus.smbj.transport.tcp.direct.DirectTcpPacketReader.doRead(DirectTcpPacketReader.java:53)
at com.hierynomus.smbj.transport.PacketReader.readPacket(PacketReader.java:70)
at com.hierynomus.smbj.transport.PacketReader.run(PacketReader.java:48)
at java.lang.Thread.run(Thread.java:762)
Caused by: com.hierynomus.protocol.commons.buffer.Buffer$BufferException: Underflow
at com.hierynomus.protocol.commons.buffer.Buffer.ensureAvailable(Buffer.java:184)
at com.hierynomus.protocol.commons.buffer.Buffer.skip(Buffer.java:732)
at com.hierynomus.mssmb2.SMB2Header.readFrom(SMB2Header.java:179)
at com.hierynomus.smb.SMBPacketData.readHeader(SMBPacketData.java:39)
at com.hierynomus.smb.SMBPacketData.
Jsmb does not speak Cifs 1.0, you can try to use the jCIFS library instead. (I don’t know if time capsule can speak anything else, I just base this comment on the mount options you mentioned)
Indeed, this looks like SMBv1. If you want to verify whether that is indeed the problem, you can add the SmbConfig.withMultiProtocolNegotiate(true) setting.
Indeed, this looks like SMBv1. If you want to verify whether that is indeed the problem, you can add the
SmbConfig.withMultiProtocolNegotiate(true)setting.
I can confirm this is the case and will cause the connection to fail with SMB1NotSupportedException.