Managing Samba from the command line
Commands |
Usage |
---|---|
samba-tool -h |
Show help menu for the samba-tool command |
samba-tool user -h |
show help menu for the samba-tool user command |
samba-tool user create xxx |
Create a user |
samba-tool user create xxx --random-password |
Create a user with random password generation |
samba-tool user list |
List users in the domain |
samba-tool user delete xxx |
Delete a user |
samba-tool user enable xxx |
Activate a user |
samba-tool user disable xxx |
Deactivate a user |
samba-tool group add |
Add a group |
samba-tool group remove |
Delete a group |
samba-tool group list |
List groups in the domain |
samba-tool group listmembers "your_domain_group" |
List all members of a group |
samba-tool domain passwordsettings show |
Display password strategy |
samba-tool domain passwordsettings set -h |
Change password policy settings |
samba-tool group addmembers your_domain_group your_domain_user |
Add a member to a group |
samba-tool group remove members your_domain_group your_domain_user |
Remove a member from a group |
samba-tool computer list |
List computers in the domain |
samba-tool gpo listall |
List the GPOs in the domain |
samba-tool drs showrepl |
Display replication status |
samba-tool dns -help |
Show help menu for the samba-tool dns command |
samba-tool dns query localhost mydomain.lan srvads A |
List type A DNS records corresponding to srvads of the mydomain.lan zone |
samba-tool processes |
View current Samba processes |
Commands |
Usage |
---|---|
systemctl start samba-ad-dc |
Start the samba service (Debian) |
systemctl stop samba-ad-dc |
Stop the samba service (Debian) |
systemctl status samba-ad-dc |
Show samba service status (Debian) |
systemctl start bind9 |
Start the bind9 service (Debian) |
systemctl stop bind9 |
Stop the bind9 service (Debian) |
systemctl status bind9 |
View status of the bind9 service (Debian) |
systemctl start samba |
Start the samba service (RedHat8 and derived distributions) |
systemctl stop samba |
Stop the samba service (RedHat8 and derived distributions) |
systemctl status samba |
Display the status of the samba service (RedHat8 and derived distributions) |
systemctl start named |
Start the named service (RedHat8 and derived distributions) |
systemctl stop named |
Stop the named service (RedHat8 and derived distributions) |
systemctl status named |
View the status of the named service (RedHat8 and derived distributions) |
Commands |
Usage |
---|---|
systemctl start smbd |
Start the smb service (Debian) |
systemctl stop smbd |
Stop the smb service (Debian) |
systemctl status smbd |
View the status of the smb service (Debian) |
systemctl start smb |
Start the smb service (RedHat8 and derived distributions) |
systemctl stop smb |
Stop the smb service (RedHat8 and derived distributions) |
systemctl status smb |
View status of the smb service (RedHat8 and derived distributions) |
systemctl start winbind |
Start the winbind service |
systemctl stop winbind |
Stop the winbind service |
systemctl status winbind |
View the status of the winbind service |