How to share files with Samba
Feed
date: 2022-05-05 14:13:31
categories: linux
firstPublishDate: 2022-05-05 14:13:31
This is my samba setup in which I have a server and the server root is shared with other clients on my local network. I have used this setup in Debian Bullseye and Debian Bookworm/testing.
For other ways transfering files, read
how to transfer files between devices
Server setup:
Edit `/etc/samba/smb.conf` to share the server root:
[homes]
browseable = yes
read only = no
create mask = 0755
directory mask = 0755
;*******************SHARE ROOT*****************
[root]
comment = root
path = /
valid users = myusername
read only = no
create mask = 0765
Restart the samaba server:
systemctl restart smbd.service
Create a samba password for `myusername`:
Client setup
Install `mount.cifs`:
apt-get install cifs-utils
Add the shared drive in `/etc/fstab`:
//SERVER_IP_ADDRESS/root /mnt cifs noauto,user,username=myusername,password=mypassword 0 0
Mount the shared drive in the client:
hashtags: #linux #samba
Feed
Guestbook