System Servicescifssmbfile-sharingmountnetwork-filesystemkerberosacl

cifs-utils

Common Internet File System utilities for managing mounts of CIFS network file systems. Provides support for cross-platform file sharing with Microsoft Windows, OS X, and other Unix systems.

Description

The cifs-utils package provides a collection of utilities for working with SMB/CIFS network file systems. These tools enable mounting remote CIFS shares, managing credentials, handling ACLs, and performing SMB-specific operations on Linux systems.

Key use cases include mounting Windows file shares on Linux, managing Kerberos authentication for secure access, displaying and modifying NTFS ACLs on CIFS mounts, and retrieving SMB quota information. The tools are essential for Linux environments that need to interact with Windows file servers or Samba shares.

This package is particularly useful in mixed OS environments where cross-platform file sharing is required. It supports advanced features like SPNEGO authentication, keytab usage, and SMB2/SMB3 dialects for modern Windows servers.

How It Works

cifs-utils operates as userspace helpers for the Linux CIFS kernel filesystem client. Tools like cifs.upcall handle kernel upcalls for request-key operations, managing Kerberos session keys (cifs.spnego keytype) and DNS resolution (dns_resolver keytype). mount.cifs implements the mount protocol using SMB/CIFS dialects, supporting authentication mechanisms like NTLM and Kerberos. ACL tools (getcifsacl, setcifsacl) translate between CIFS security descriptors and Linux permissions. smbinfo uses CIFS IOCTLs to query SMB-specific file attributes.

Installation

bash
sudo apt install cifs-utils

Flags

-hDisplay help text (cifs.idmap)
-vVerbose output or version (multiple tools)
-tTrust DNS for reverse hostname lookups (cifs.upcall)
--trust-dns|-tTrust DNS for krb5 upcalls hostname resolution (cifs.upcall)
--legacy-uid|-lUse legacy uid parameter instead of creduid (cifs.upcall)
--krb5conf|-kSpecify alternate krb5.conf location (cifs.upcall)
-uSpecify username (cifscreds, mount.cifs)
-dUse domain credentials (cifscreds)
-RRecurse into subdirectories (getcifsacl)
-aAdd ACE(s) to ACL (setcifsacl)
-tTabular quota output (smb2-quota)

Examples

Display usage help for cifs.idmap
cifs.idmap -h
Userspace upcall helper with DNS trust option
cifs.upcall --trust-dns|-t
Add NTLM credentials to kernel keyring
cifscreds add [-u username] [-d] <host|domain> [-t timeout]
Display CIFS/NTFS ACL for a file object
getcifsacl [option] <file_name1>
Mount CIFS share to local directory
mount.cifs <remotetarget> <dir> -o <options>
Display version number of mount.cifs helper
mount.cifs -V
Add full access ACE for Administrator to file ACL
setcifsacl -a "ACL:Administrator:ALLOWED/0x0/FULL" <file_name>
Show help for SMB2 quota information display
smb2-quota -h
Updated 2026-04-16kali.org ↗