This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| file-server [2020/10/26 11:37] – gwsadmin | file-server [2023/05/17 22:52] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | <h1>Add Samba</h1> <div class=" | + | ====== |
| - | <p> These commands are set for < | + | * Use this command |
| - | <p> < | + | <code vim> |
| + | apt install samba samba-common-bin | ||
| - | </pre>< | + | </code> |
| + | * Add Shares by using | ||
| - | <p> • Add Shares by using </p> <pre class=" | + | <code vim> |
| + | nano / | ||
| - | </pre>< | + | </code> |
| + | * Add these AT THE BOTTOM! | ||
| - | <p> • Add these AT THE BOTTOM! </p> <pre class=" | + | <code vim> |
| + | ## Share | ||
| - | <span class=" | + | [Share] |
| - | comment = needs username and password | + | comment = needs username and password to access |
| + | path = /physicalpathyouwant/toshare | ||
| + | browseable = yes | ||
| + | guest ok = no | ||
| + | writable = yes | ||
| + | valid users = @samba | ||
| - | ## Movies Share | + | </ |
| + | * Add Username | ||
| - | <span class=" | + | <code vim> |
| + | sudo adduser ' | ||
| - | comment = needs username and password <span class=" | + | </code> |
| + | * Add Password | ||
| - | ## TV Recordings Share | + | <code vim> |
| + | sudo smbpasswd -a 'user | ||
| - | <span class=" | + | </code> |
| + | * Create Samba Group | ||
| - | comment = needs username and password | + | <code vim> |
| + | sudo groupadd | ||
| - | ## TV Share | + | </ |
| + | * Add user to group | ||
| - | <span class=" | + | <code vim> |
| + | sudo gpasswd -a ' | ||
| - | comment = needs username and password <span class=" | + | </code> |
| + | * Then add read/write/execute permissions to the drives: | ||
| - | ## Music Share | + | <code vim> |
| + | sudo setfacl -R -m " | ||
| - | <span class=" | + | </code> |
| + | * Restart Samba | ||
| - | comment = needs username and password | + | <code vim> |
| + | sudo systemctl restart smbd nmbd | ||
| - | ## Backup Share | + | </ |
| - | + | ||
| - | <span class=" | + | |
| - | + | ||
| - | comment = needs username and password <span class=" | + | |
| - | + | ||
| - | <span class=" | + | |
| - | + | ||
| - | comment = needs username and password <span class=" | + | |
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | </div> | + | |