ntfs-3g.usermap
Map Windows user IDs to Linux IDs
SYNOPSIS
ntfs-3g.usermap --help|--version|--quiet|--verbose --domsid SID --user UID[:GID]|--group GID[:UID] mapping-file
PARAMETERS
--help
Display help information and exit.
--version
Display version information and exit.
--quiet
Suppress warning and error messages.
--verbose
Enable verbose output.
--domsid SID
Specify the Windows domain SID. This is necessary for identifying users and groups within a particular domain.
--user UID[:GID]
Map the given Windows user SID to the specified Unix user ID (UID) and optionally, a group ID (GID). If only the UID is given, the group mapping will stay untouched.
--group GID[:UID]
Map the given Windows group SID to the specified Unix group ID (GID) and optionally, a user ID (UID). If only the GID is given, the user mapping will stay untouched.
mapping-file
The path to the user mapping file. This file stores the SID to UID/GID mappings.
DESCRIPTION
The `ntfs-3g.usermap` command is a helper utility for the `ntfs-3g` driver. It facilitates mapping Windows user and group security identifiers (SIDs) to Unix user IDs (UIDs) and group IDs (GIDs) when mounting NTFS volumes with user mapping enabled. This is crucial for providing proper file ownership and permissions on NTFS filesystems when accessed from a Linux environment.
By creating a mapping file, administrators can define how Windows users and groups are represented on the Linux system. This enables a more seamless integration between Windows and Linux environments, ensuring that files created or modified from either operating system retain their intended ownership and permissions when accessed from the other. The mapping file is read by the `ntfs-3g` driver during mount operation, ensuring that the translation happen on-the-fly during file access.
CAVEATS
Incorrect mapping can lead to permission issues, potentially exposing files to unauthorized access or preventing legitimate users from accessing needed files. The domain SID must be correct. Using inconsistent domain SID causes mapping corruption.
MAPPING FILE FORMAT
The mapping file is a simple text file where each line represents a mapping. The format is SID=UID[:GID] for user mappings and SID=GID[:UID] for group mappings. SID is the Windows Security Identifier, UID is the Unix User ID, and GID is the Unix Group ID. Domain SID must be set up with --domsid option before any mapping.
Example:
S-1-5-21-1234567890-1234567890-1234567890-1000=1000:100
S-1-5-21-1234567890-1234567890-1234567890-513=100
USAGE EXAMPLE
To create a mapping file:
ntfs-3g.usermap --domsid S-1-5-21-1234567890-1234567890-1234567890 my_mapping_file
ntfs-3g.usermap --user 1000:100 S-1-5-21-1234567890-1234567890-1234567890-1000 my_mapping_file
To mount the partition with mapping:
mount -t ntfs-3g -o usermap=my_mapping_file /dev/sda1 /mnt
HISTORY
The `ntfs-3g.usermap` utility was developed as part of the `ntfs-3g` project to address the challenges of interoperability between Windows and Linux filesystems. It provides a mechanism for resolving the differences in user and group ID schemes, enabling users to seamlessly share files between the two operating systems.