CIFS

From Lolly's Wiki
Jump to navigationJump to search

Decode version from vers=default out of mount options

Sometimes you see from a mounte share jus vers=default like this:

# grep cifs /proc/self/mounts
//cifs.server.de/cifsshare /media/cifs cifs rw,relatime,vers=default,cache=strict,username=s_ndr_mgt_saw,domain=AD,uid=0,noforceuid,gid=0,noforcegid,addr=172.16.42.12,file_mode=0644,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1 0 0

To see the real version you need to take a look at /proc/fs/cifs/DebugData

# cat  /proc/fs/cifs/DebugData 
Display Internal CIFS Data Structures for Debugging
---------------------------------------------------
CIFS Version 2.34
Features: DFS,FSCACHE,STATS2,DEBUG,ALLOW_INSECURE_LEGACY,WEAK_PW_HASH,CIFS_POSIX,UPCALL(SPNEGO),XATTR,ACL
CIFSMaxBufSize: 16384
Active VFS Requests: 0

Servers: 
1) ConnectionId: 0x1 Hostname: cifs.server.de 
Number of credits: 510 Dialect 0x302
TCP status: 1 Instance: 1
Local Users To Server: 1 SecMode: 0x1 Req On Wire: 0
In Send: 0 In MaxReq Wait: 0

	Sessions: 
	1) Address: 172.16.42.11 Uses: 1 Capability: 0x300045	Session Status: 1 
	Security type: RawNTLMSSP  SessionId: 0xf482c7c8
	User: 0 Cred User: 0

	Shares: 
	0) IPC: \\cifs.server.de\IPC$ Mounts: 1 DevInfo: 0x0 Attributes: 0x0
	PathComponentMax: 0 Status: 1 type: 0 Serial Number: 0x0
	Share Capabilities: None	Share Flags: 0x0
	tid: 0x93aa3485	Maximal Access: 0x1f00a9

	1) \\cifs.server.de\cifsshare Mounts: 1 DevInfo: 0x20 Attributes: 0x1006f
	PathComponentMax: 255 Status: 1 type: DISK Serial Number: 0xa0f7daf8
	Share Capabilities: None Aligned, Partition Aligned,	Share Flags: 0x0
	tid: 0xe625f45d	Optimal sector size: 0x200	Maximal Access: 0x1f01ff


	MIDs: 
--

In this example you can see the Dialect in line 11 (highlighted) where we can see we are using SMB 3.02.

Links: