.. Reminder for header structure: Parts (H1) : #################### with overline Chapters (H2) : ******************** with overline Sections (H3) : ==================== Subsections (H4) : -------------------- Subsubsections (H5) : ^^^^^^^^^^^^^^^^^^^^ Paragraphs (H6) : """"""""""""""""""""" .. |date| date:: .. meta:: :description: Managing Samba from the command line :keywords: Samba-AD, samba-tool, documentation, CLI .. _samba_commands_utils: #################################### Managing Samba from the command line #################################### .. list-table:: List of basic samba-tool commands :header-rows: 1 :widths: 50, 50 * - Commands - Usage * - :command:`samba-tool -h` - Show help menu for the samba-tool command * - :command:`samba-tool user -h` - show help menu for the samba-tool user command * - :command:`samba-tool user create xxx` - Create a user * - :command:`samba-tool user create xxx --random-password` - Create a user with random password generation * - :command:`samba-tool user list` - List users in the domain * - :command:`samba-tool user delete xxx` - Delete a user * - :command:`samba-tool user enable xxx` - Activate a user * - :command:`samba-tool user disable xxx` - Deactivate a user * - :command:`samba-tool group add` - Add a group * - :command:`samba-tool group remove` - Delete a group * - :command:`samba-tool group list` - List groups in the domain * - :command:`samba-tool group listmembers "your_domain_group"` - List all members of a group * - :command:`samba-tool domain passwordsettings show` - Display password strategy * - :command:`samba-tool domain passwordsettings set -h` - Change password policy settings * - :command:`samba-tool group addmembers your_domain_group your_domain_user` - Add a member to a group * - :command:`samba-tool group remove members your_domain_group your_domain_user` - Remove a member from a group * - :command:`samba-tool computer list` - List computers in the domain * - :command:`samba-tool gpo listall` - List the GPOs in the domain * - :command:`samba-tool drs showrepl` - Display replication status * - :command:`samba-tool dns -help` - Show help menu for the samba-tool dns command * - :command:`samba-tool dns query localhost mydomain.lan srvads A` - List type A DNS records corresponding to srvads of the mydomain.lan zone * - :command:`samba-tool processes` - View current Samba processes .. list-table:: List of commands for service management :header-rows: 1 :widths: 50, 50 * - Commands - Usage * - :command:`systemctl start samba-ad-dc` - Start the samba service (Debian) * - :command:`systemctl stop samba-ad-dc` - Stop the samba service (Debian) * - :command:`systemctl status samba-ad-dc` - Show samba service status (Debian) * - :command:`systemctl start bind9` - Start the bind9 service (Debian) * - :command:`systemctl stop bind9` - Stop the bind9 service (Debian) * - :command:`systemctl status bind9` - View status of the bind9 service (Debian) * - :command:`systemctl start samba` - Start the samba service (RedHat8 and derived distributions) * - :command:`systemctl stop samba` - Stop the samba service (RedHat8 and derived distributions) * - :command:`systemctl status samba` - Display the status of the samba service (RedHat8 and derived distributions) * - :command:`systemctl start named` - Start the named service (RedHat8 and derived distributions) * - :command:`systemctl stop named` - Stop the named service (RedHat8 and derived distributions) * - :command:`systemctl status named` - View the status of the named service (RedHat8 and derived distributions) .. list-table:: On a file server :header-rows: 1 :widths: 50, 50 * - Commands - Usage * - :command:`systemctl start smbd` - Start the smb service (Debian) * - :command:`systemctl stop smbd` - Stop the smb service (Debian) * - :command:`systemctl status smbd` - View the status of the smb service (Debian) * - :command:`systemctl start smb` - Start the smb service (RedHat8 and derived distributions) * - :command:`systemctl stop smb` - Stop the smb service (RedHat8 and derived distributions) * - :command:`systemctl status smb` - View status of the smb service (RedHat8 and derived distributions) * - :command:`systemctl start winbind` - Start the winbind service * - :command:`systemctl stop winbind` - Stop the winbind service * - :command:`systemctl status winbind` - View the status of the winbind service