samba network

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
negubill
Posts: 14
Joined: Wed Jun 24, 2020 5:51 pm

Re: samba network

Post by negubill »

good afternoon helps me create or create additional SAMBA shares for my HDDs.
negubill
Posts: 14
Joined: Wed Jun 24, 2020 5:51 pm

Re: samba network

Post by negubill »

help
User avatar
MichaIng
Site Admin
Posts: 2423
Joined: Sat Nov 18, 2017 6:21 pm

Re: samba network

Post by MichaIng »

Hi, for this open /etc/samba/smb.conf and add + adjust an additional block to the end of the file, that looks like this:

Code: Select all

[myshare]
	comment = my share
	path = /mnt/myHDD
	browseable = yes
	create mask = 0664
	directory mask = 0775
	valid users = dietpi
	writeable = yes
	max connections = 1
The name in the square brackets is what needs to be used when adding the share to a remove Samba client, the comment is more like a visual name. Depending on your requirements, authentication user and permission modes can be adjusted of course, the above example matches the default dietpi share accessible by the dietpi user and files+dirs are created a way that all members of the dietpi group have write access as well, e.g. download and media software.
negubill
Posts: 14
Joined: Wed Jun 24, 2020 5:51 pm

Re: samba network

Post by negubill »

root @ DietPi: ~ # /etc/samba/smb.conf
bash: /etc/samba/smb.conf: Permission denied
root @ DietPi: ~ #
User avatar
trendy
Posts: 156
Joined: Tue Feb 25, 2020 2:54 pm

Re: samba network

Post by trendy »

Code: Select all

sudo vim /etc/samba/smb.conf
User avatar
Joulinar
Posts: 2597
Joined: Sat Nov 16, 2019 12:49 am

Re: samba network

Post by Joulinar »

it should be fine to do

Code: Select all

nano /etc/samba/smb.conf
@trendy
usually vim is not installed by default if I'm not mistaken
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
trendy
Posts: 156
Joined: Tue Feb 25, 2020 2:54 pm

Re: samba network

Post by trendy »

Maybe you are right @Joulinar, I don't remember if it exists as symbolic link to vi. I immediately install it anyway on first boot.
User avatar
MichaIng
Site Admin
Posts: 2423
Joined: Sat Nov 18, 2017 6:21 pm

Re: samba network

Post by MichaIng »

The editor command should btw always work and is bound by the alternatives system to any newly installed editor:

Code: Select all

2020-11-01 18:56:38 root@micha:/mnt/sda# which editor
/usr/bin/editor
2020-11-01 18:56:41 root@micha:/mnt/sda# l /usr/bin/editor
lrwxrwxrwx 1 root root 24 Aug 20 12:29 /usr/bin/editor -> /etc/alternatives/editor
2020-11-01 18:56:45 root@micha:/mnt/sda# l /etc/alternatives/editor
lrwxrwxrwx 1 root root 9 Aug 20 12:29 /etc/alternatives/editor -> /bin/nano
Post Reply