sudo apt install samba samba-common-bin sudo smbpasswd -a sagar
- Edit /etc/samba/smb.conf and add shares at the end
[MyBookA]
comment = My Book A
read only = no
path = /media/sagar/MyBookA
browseable = yes
guest ok = yes
create mask = 0700
directory mask = 0700
valid users = sagar
[MyBookB]
comment = My Book A
read only = no
path = /media/sagar/MyBookB
browseable = yes
guest ok = yes
create mask = 0700
directory mask = 0700
sudo blkid | grep crypto sudo cryptsetup luksOpen /dev/sdb2 sdb2crypt sudo cryptsetup luksOpen /dev/sdc2 sdc2crypt sudo mount /dev/mapper/sdb2crypt /media/sagar/MyBookA sudo mount /dev/mapper/sdc2crypt /media/sagar/MyBookB
sudo mkdir /media/sagar sudo chown -R sagar:sagar /media/sagar
sudo mount -o user /dev/mapper/sdb2crypt /media/sagar/MyBookA sudo mount -o user /dev/mapper/sdc2crypt /media/sagar/MyBookB
sudo systemctl restart smbd.service