A command-line tool for configuring and managing Samba Active Directory Domain Controller.
- Simplified Samba AD DC configuration and management
- User-friendly command-line interface with green theme
- Progress indicators and visual feedback
- Comprehensive logging system
- English language support
- Domain Controller setup and configuration
- User and group management with quota support
- Share management with advanced permissions
- Backup and restore functionality with retention policies
- Service monitoring and status tracking
- DNS and Kerberos configuration
- Modular architecture for easy maintenance
- Comprehensive error handling and logging
- Progress bars for long operations
- Color-coded status messages
- Configuration backup and restore
- Service health monitoring
- Secure password policies
- Permission management
- Backup encryption support
- Audit logging
- SSL/TLS support for secure connections
- Ubuntu Server 22.04 LTS
- Ubuntu Server 22.10
- Ubuntu Server 24.04 LTS (Development)
- Samba 4.19.x or higher
- Root/sudo privileges
- Required packages:
- samba
- winbind
- krb5-config
- Domain: DOMAIN.LOCAL
- Workgroup: DOMAIN
- NetBIOS name: SV-DOMAIN
- DNS forwarder: 1.1.1.1
- Clone the repository:
git clone https://github.com/gustavofalcao1/SambaSetup-CLI.git
cd SambaSetup-CLI
- Make the main script executable:
chmod +x sambasetup
Run the main script as root:
sudo ./sambasetup
./sambasetup -h # Show help message
./sambasetup -v # Show version information
./sambasetup -s # Show service status
./sambasetup -l # Show recent logs
-
Domain Configuration
- Initial DC setup
- Environment cleanup and reset
- DNS and Kerberos configuration
- Domain join operations
- Forest level management
-
User Management
- Create/remove users
- Manage groups and permissions
- Set user quotas
- Password policies
- User templates
-
Share Management
- Create/remove shares
- Configure permissions
- Access control lists
- Share templates
- Mount point management
-
Monitoring and Logs
- Service status with visual indicators
- Real-time log viewing
- Active connections monitoring
- Performance metrics
- System statistics
-
Backup and Restore
- Full system backup
- Incremental backups
- Scheduled backups
- 30-day retention management
- Backup verification
-
Advanced Settings
- smb.conf editor
- DNS configuration
- Kerberos settings
- Service management
- Performance tuning
SambaSetup-CLI/
├── docs/ # Documentation
├── logs/ # System logs
├── src/
│ ├── config/ # Configuration files
│ │ └── settings.conf
│ ├── lib/ # Shared libraries
│ │ └── utils.sh # Utility functions
│ ├── samba.sh # Samba configuration
│ ├── shares.sh # Share management
│ └── users.sh # User management
└── sambasetup # Main script
The main configuration file src/config/settings.conf
contains:
- System paths and directories
- Visual theme settings (green color scheme)
- Default Samba settings
- Backup configuration
- Service settings
System logs are stored in:
/home/administrator/SambaSetup-CLI/logs/sambasetup.log
- General logs/home/administrator/SambaSetup-CLI/logs/error.log
- Error logs/var/log/samba/log.samba
- Samba logs
The tool features a modern command-line interface with:
- ASCII art logo for brand identity
- Progress bars for long operations
- Color-coded status messages
- Green-themed menus and prompts
- Clear visual hierarchy
- Intuitive navigation
- Comprehensive error checking
- Color-coded error messages
- Detailed logging
- User-friendly error recovery
- Confirmation prompts for critical actions
- Automated backup system
- 30-day retention policy
- Progress indication during backup/restore
- Backup verification
- Easy restoration process
- Efficient resource usage
- Fast operation execution
- Minimal system impact
- Optimized code structure
- Cache management
- Secure password handling
- Permission verification
- Audit logging
- SSL/TLS support
- Backup encryption
Feel free to contribute to the project through pull requests or by reporting issues.
This project is licensed under the MIT License.
- Version 2.1.4
- Complete English translation
- Updated visual theme to green color scheme
- Enhanced progress indicators
- Updated default domain settings
- Improved error handling
- Added comprehensive logging
- Enhanced backup system
- Added command-line interface
- Improved documentation
For issues, feature requests, or general questions:
- Create an issue on GitHub
- Contact the maintainer
- Check the documentation
Gustavo Falcão
- GitHub: @gustavofalcao1
- Repository: SambaSetup-CLI