smbinfo(1)

πŸ’… smbinfo(1) β€” the manual, but make it make sense

okay so bestie, welcome to smbinfo(1), straight out of the General Commands Manual. Pull up a chair, grab a lil snack πŸ“, and let's get into it.


✨ NAME ✨

smbinfo β€” a userspace helper that displays SMB-specific file information for the Linux SMB client file system (CIFS). yes that is the whole name, she's thorough πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

smbinfo [-v] [-h] [-V] {command} {file system object}

that's it. that's the whole vibe check. a couple of flags, a command, and the file system object you're being nosy about. πŸŽ€


🌸 DESCRIPTION 🌸

okay so first things first: this tool is part of the cifs-utils suite. she's not a lone wolf, she comes with the whole friend group.

smbinfo is a userspace helper program for the Linux SMB client file system (CIFS). what she does is display SMB-specific file informations β€” iconic stuff like Security Descriptors and Quota. πŸ‘‘

and the way it works is genuinely so cool: this tool makes a CIFS_QUERY_INFO IOCTL call to the Linux SMB client, which then issues a SMB Query Info request and hands back the result. no cap, that's the whole mechanism. πŸ”₯

and yes, before you ask β€” this is different from getcifsacl, because that one uses extended file attributes instead. two different girls, two different strategies. iykyk πŸ’…

πŸ’– OPTIONS πŸ’–

  • -v β€” print the version number and then exit. quick lil hello and she's out the door 🫢
  • -V β€” verbose output. she's gonna talk more. much more. (yes, lowercase -v is version and uppercase -V is verbose β€” not me getting those mixed up, i literally would, be careful πŸ’€)
  • -h β€” print help explaining the command line options. the classic "bestie explain urself" button 😭

πŸ‘‘ COMMAND πŸ‘‘

okay here's the menu. pick your fighter ✨

  • fileaccessinfo β€” prints the FileAccessInformation class
  • filealigninfo β€” prints the FileAlignmentInformation class
  • fileallinfo β€” prints the FileAllInformation class
  • filealternatenameinfo β€” prints the FileAlternateNameInformation class
  • filebasicinfo β€” prints the FileBasicInformation class
  • fileeainfo β€” prints the FileEaInformation class
  • filefsfullsizeinfo β€” prints the FileFsFullSizeInformation class
  • fileinternalinfo β€” prints the FileInternalInformation class
  • filemodeinfo β€” prints the FileModeInformation class
  • filenormalizednameinfo β€” prints the FileNormalizedNameInformation class
  • filepositioninfo β€” prints the FilePositionInformation class
  • filestandardinfo β€” prints the FileStandardInformation class
  • filestreaminfo β€” prints the FileStreamInformation class
  • filecompressioninfo β€” prints the FileCompressionInformation class
  • fsctl-getobjid β€” prints the ObjectID
  • getcompression β€” prints the compression setting for the file. πŸ—œοΈ
  • setcompression -c <no|default|lznt1> β€” sets the compression setting for the file. options are no, default, or lznt1 β€” pick your poison πŸ’…
  • list-snapshots β€” lists the previous versions of the volume that backs this file. the throwback machine πŸ•°οΈ
  • quota β€” print the quota for the volume, in the form: SID Length - Change Time - Quota Used - Quota Threshold - Quota Limit - SID
  • secdesc β€” print the security descriptor, in the form: Revision - Control - Owner SID - Group SID - ACL - File types - File flags
  • keys β€” dump session id, encryption keys and decryption keys so that the SMB3 traffic of this mount can be decryped e.g. via wireshark. requires root. πŸ” (and yes, the manpage really does say "decryped" β€” i'm not fixing her, she's perfect πŸ™ˆ)
  • gettconinfo β€” prints both the TCON Id and Session Id for a cifs file
  • notify β€” query a directory for change notifications πŸ‘€

🧚 NOTES 🧚

kernel support for smbinfo utilities requires the CIFS_QUERY_INFO IOCTL. that bad boy was initially introduced in the 4.20 kernel, and it's only implemented for mount points using SMB2 or above β€” see the mount.cifs(8) vers option if you need to check yours. ⭐

so if you're on some ancient kernel or still rocking SMB1, this is gonna be giving nothing. check ur vers, bestie. πŸ’€

🌈 SEE ALSO 🌈

go read those too, they're literally her cousins 🫢


πŸŽ€ AUTHOR πŸŽ€

Ronnie Sahlberg wrote the smbinfo program. absolute icon, no notes. πŸ‘‘

and if you got questions about any of these programs, the Linux CIFS Mailing list is the preferred place to ask. that's where the girlies gather πŸ’œ


okay that's the whole page!! that was smbinfo(1) from the General Commands Manual, part of the cifs-utils suite β€” she's here, she's iconic, go query some info. slay βœ¨πŸ’…πŸ¦‹

πŸ“¦ where this page comes from