samba server does not work

Hello,
i want to enable the smb server on dietpi. I did the installation of the samba server. During the automatic configuration the following message appears

FAILED] Samba mount failed with the following error output: │
│ │
│ mount error(2): No such file or directory │
│ Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) │
│ mount error(2): No such file or directory │
│ Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) │
│ mount error(2): No such file or directory │
│ Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) │
│ mount error(2): No such file or directory │
│ Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) │
│ mount error(2): No such file or directory │
│ Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) │

I assume that the file is created during the automatic configuration. Or do I see it wrong.
Do I have to create a file before? The Raspberrypi 3B+ is connected to an usb disk which is mounted. My system is linux debian
Is there a detailed description? I can’t find anything anywhere.
Could someone give me a hint what I am doing wrong? Thanks a lot

Hi,

many thanks for your message. Just for clarification. You like to configure DietPi as SAMBA client to be able to connect to a different SAMBA server?

According the error message, the share you specified did no exist on SAMBA server side.

Good Morning Joulinar,
Thank you very much for your answer. I found the manual and the smb server is running fine.
It was about making the hard disk on the raspberrypi visible on my PC and in the network to store data on it.
I was just too stupid for that. Now it runs wonderfully.
Now I just want to change the smb user. But I cannot find the /etc/samba/smb.conf.

hmm that’s quite strange, /etc/samba/smb.conf is the main configuration file and it should be there. Otherwise SAMBA should not work. Can you check

ls -la /etc/samba/

but that should already be there. I just don’t know where to look?

pls can you do following on command line

cat /etc/samba/smb.conf

that is the output
workgroup = WORKGROUP
server string = %h server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog only = no
syslog = 0

panic action = /usr/share/samba/panic-action %d

security = user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes

passwd program = /usr/bin/passwd %u
passwd chat = Enter\snew\s\spassword:* %n\n Retype\snew\s\spassword:* %n\n password\supdated\ssuccessfully .
pam password change = yes
map to guest = bad user

load printers = no
printcap name = /dev/null
disable spoolss = yes

[dietpi]
comment = DietPi Share
path = /mnt/dietpi_userdata
browseable = yes
create mask = 0664
directory mask = 0775
valid users = dietpi
writeable = yes

Hi,

this is your SAMBA configuration file. The last 7 lines describing details of your share

[dietpi]
comment = DietPi Share
path = /mnt/dietpi_userdata
browseable = yes
create mask = 0664
directory mask = 0775
valid users = dietpi
writeable = yes

What do you like to change now?

somewhere i read to change the smb name dietpi because of security. Whatever the reason?
If this is not necessary, I leave it as it is. I just wanted to know how to get to the etc file to change the name. There is the dietpi-explorer, where you can change the smb password and the name? Is that correct?
I don’t want to annoy you with this topic any longer, the smb server is running wonderfully. You have already helped me there.
More important is the other topic with letsencrypt. I have installed the Baikal Webdav. It runs and synchronizes perfectly. But without tls encryption it makes no sense.

as long as you don’t use standard password on user DietPi you should be fine.

However if you like to change the user anyway, you would need to create a user first. By default DietPi did not contain any personal user.

To edit SAMBA configuration file just do nano /etc/samba/smb.conf and change the user within the share configuration section.

This works. Found it thanks to your help. Thanks a lot