winbindd
winbindd is a component of Samba that allows a Linux or Unix system to communicate with Windows domain controllers (Active Directory or NT domains). It enables Unix-based systems to participate in a Windows-based network by performing tasks such as:
User and Group Authentication: Allows Linux systems to authenticate users from Windows domains.
SID to UID/GID Mapping: Maps Windows security identifiers (SIDs) to Unix user IDs (UIDs) and group IDs (GIDs).
Single Sign-On (SSO): Integrates Unix systems into a Windows Active Directory (AD) domain for single sign-on capabilities.
Name Resolution: Resolves Windows domain user and group names to Unix counterparts.
Core Functions of winbindd:
Domain Integration: Integrates a Linux machine into a Windows domain (Active Directory or NT-style domains).
User and Group Management: Manages domain user and group accounts, allowing domain users to log in to the Linux system using their AD credentials.
Authentication: Authenticates users against a Windows Domain Controller (DC), supporting both NTLM and Kerberos authentication protocols.
User and Group Enumeration: Lists users and groups from a Windows domain on the Linux system.
SSO in Mixed Environments: Provides seamless login capabilities across Windows and Linux systems when integrated with Kerberos.
Installation of winbindd:
To install winbindd
on your Linux system, use the following package managers:
Configuration of winbindd:
To configure winbindd
, you'll need to edit several key files:
/etc/samba/smb.conf: Configures the integration of the Linux system with the Windows domain.
/etc/nsswitch.conf: Ensures that domain users and groups are available for login.
/etc/krb5.conf (if using Kerberos): Configures Kerberos for authentication.
Example smb.conf for winbindd Integration:
Step-by-Step Setup for winbindd with Active Directory:
Join Linux System to AD Domain:
Enable winbindd and related services:
Modify
/etc/nsswitch.conf
: Ensure the following entries are present to enable winbind for user and group lookups:
Testing the Domain Join:
Check if the system has successfully joined the domain by running:
You can also verify that users can be resolved correctly:
Mapping Windows Users and Groups to Unix:
winbindd
maps Windows users and groups to Unix IDs, which are required for file ownership and permission settings on Linux systems.
UID/GID Mapping:
winbindd
maps Windows Security Identifiers (SIDs) to Unix UIDs/GIDs using a mapping backend.ID Mapping Backends:
tdb: Local TDB database for mapping.
ad: Retrieves Unix attributes (UID/GID) from AD.
rid: Derives UIDs/GIDs based on the user's RID.
Example smb.conf configuration for mapping:
Enabling Kerberos for SSO:
To fully integrate into a Windows Active Directory domain with SSO, you need to configure Kerberos:
Edit /etc/krb5.conf to include your domain’s Kerberos details:
Obtain a Kerberos ticket using the
kinit
command:
Verify ticket status:
winbindd Logs and Troubleshooting:
The logs for winbindd
can be found in the /var/log/samba/
directory. Common log files include:
log.winbindd: Contains logs for the winbind daemon.
log.wb-*: Per-domain log files for winbindd interactions with specific domains.
If users cannot log in or there are problems with domain integration, check these logs for errors.
Common Issues and Fixes:
User Cannot Authenticate:
Ensure that the system has successfully joined the domain.
Check Kerberos ticket status (
klist
).Verify
/etc/nsswitch.conf
is correctly configured.
UID/GID Mismatch:
Adjust the ID mapping configuration in
smb.conf
.Use the
wbinfo
command to test UID/GID resolution for domain users and groups.
winbindd Fails to Start:
Check for configuration errors in
smb.conf
usingtestparm
.Look for logs in
/var/log/samba/log.winbindd
.
Last updated