Pcornel
Linux · File Services

SMB

Cheat sheet · https://pcornel.dk/topic.php?topic=2886

Back to the Topic

Answer

SMB (Server Message Block) is the file-sharing protocol used by Windows and served by Samba on Linux; Linux clients mount SMB shares with mount.cifs (mount -t cifs).

Remember

Specify the version (vers=3.0) — SMB1 is disabled almost everywhere. Store credentials in a root-only file (credentials=). Set uid/gid/file_mode for local ownership.

First checks

  • showmount -e <server> / exportfs -v — NFS exports
  • findmnt -t nfs,nfs4,cifs — mounted network shares
  • smbclient -L //<server> -U <user> — SMB shares
  • testparm -s — Samba configuration check

Commands

mount -t cifs
mount error(13): Permission denied
mount error(95): Operation not supported
findmnt

Verify in this order

client → TCP 445 → SMB negotiation (version, signing) → authentication → share mounted

Where it usually breaks

First mismatch in persistent intent → provider/parser/generator → kernel/userspace runtime → dependency/security context → logs/counters → consumer-visible read-back; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2886

Confirmation

Confirm action

Continue?