Pcornel
Linux · File Services

Samba

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

Back to the Topic

Answer

Samba implements SMB/CIFS file and print sharing on Linux, configured in /etc/samba/smb.conf, with users in its own database (smbpasswd) or joined to Active Directory (winbind/sssd).

Remember

Check config with testparm. Samba users need a Samba password (smbpasswd -a) unless AD is used. Both share permissions and Linux file permissions apply; on RHEL SELinux needs samba_share_t labels.

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

Verify in this order

smb.conf share → smbd listening on 445 → user authenticated → share and file permissions → access

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=2885

Confirmation

Confirm action

Continue?