samba-tool
samba-tool
is a comprehensive command-line utility that allows administrators to manage and configure various aspects of Samba. It is particularly useful for tasks related to Active Directory (AD) management, domain controllers, and other advanced configurations.
General Usage
samba-tool
encompasses a wide range of commands and subcommands for different purposes. Below are some of the most commonly used categories and examples.
Active Directory (AD) Management
Creating a Domain
This command guides you through the process of creating a new Samba AD domain controller interactively.
Joining a Domain
This command joins an existing domain as an additional domain controller.
Managing Users
Creating a User
This command creates a new AD user with the specified attributes.
Deleting a User
This command deletes an AD user.
Changing a User's Password
This command prompts to set a new password for the specified user.
Managing Groups
Creating a Group
This command creates a new AD group.
Adding a User to a Group
This command adds a user to a specified group.
Removing a User from a Group
This command removes a user from a specified group.
Domain and DNS Management
Listing Domain Controllers
This command lists all domain controllers in the domain.
Managing DNS Records
Adding a DNS Record
Example:
Deleting a DNS Record
Example:
Forcing a Replication
Example:
Schema Management
Extending the Schema
This command upgrades the AD schema to match the schema of a given Windows AD.
Checking Schema
This command performs various consistency checks on the AD database.
Troubleshooting and Maintenance
Checking the Database
This command checks the AD database for consistency issues.
Resetting the SYSVOL ACLs
This command resets the Access Control Lists (ACLs) on the SYSVOL share.
Inspecting Logs
Example:
This command sets the log level for Samba components to aid in troubleshooting.
Example Usage Scenarios
Provisioning a New Domain
Creating a New User
Adding a DNS Record
Forcing Replication Between Domain Controllers
Resetting SYSVOL ACLs
Conclusion
samba-tool
is a versatile and powerful command-line utility that simplifies the management and administration of Samba, particularly in an Active Directory environment. Whether provisioning domains, managing users and groups, configuring DNS, or troubleshooting, samba-tool
provides a comprehensive set of commands to effectively manage Samba servers. Understanding and utilizing these commands can greatly enhance an administrator’s ability to maintain and optimize a Samba-based network infrastructure.
Last updated