Last active
August 22, 2025 17:27
-
-
Save mateusreis/a32eddf23ad8caa776ef58cf0c680ac7 to your computer and use it in GitHub Desktop.
Samba com Ubuntu server e Windows 10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Instalar o samba: | |
| $ sudo apt install samba | |
| $ systemctl status smbd | |
| Alterar a configuracao: | |
| $ cd /etc/samba/ | |
| Create a config file | |
| $ sudo mv smb.conf smb.conf.bak | |
| stop the service | |
| $ sudo systemctl stop smbd | |
| checar se está rodando: | |
| $ sudo systemctl status smbd | |
| $ sudo nano /etc/samba/smb.conf | |
| [global] | |
| server string = File Server | |
| workgroup = WORKGROUP | |
| #netbios name = VADER | |
| client max protocol = NT1 | |
| security = user | |
| server min protocol = SMB3 | |
| client min protocol = SMB3 | |
| client max protocol = SMB3 | |
| map to guest = Bad User | |
| name resolve order = bcast host | |
| lanman auth = no | |
| ntlm auth = yes | |
| cliente lanman auth = no | |
| wins support = yes | |
| local master = yes | |
| include = /etc/samba/shares.conf | |
| $ sudo nano /etc/samba/shares.conf | |
| [Matrix] | |
| comment = Disk 500Gb | |
| path = /mnt/disk-matrix | |
| browsable = yes | |
| guest ok = yes | |
| read only = no | |
| create mask = 0664 | |
| force create mode = 0664 | |
| directory mask = 0775 | |
| force directory mode = 0775 | |
| force user = mateus | |
| force group = mateus | |
| # setting up wsdd | |
| $ sudo apt install wsdd | |
| $ sudo apt install wsdd-server -y | |
| after you install the service add this file if it is not present: /etc/default/wsdd | |
| add the following lines to the file | |
| # Defaults file for wsdd | |
| # | |
| # Useful args here are -i eth0 -6 etc | |
| # Consult wsdd(8) man page | |
| WSDD_PARAMS="--workgroup <your group name>" | |
| 3. start both the smbd and wsdd-server services | |
| $ systemctl start smbd | |
| $ systemctl start wsdd-server | |
| 4. configure the firewall | |
| $ sudo ufw allow Samba | |
| 5. restart the smbd and nmbd services | |
| $ sudo systemctl restart smbd nmbd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment