i have installed the samba server in a raspberry 3 but I cannot connect to the server from any device (android mobile, android tv).
in the config file i have also added an external disk.
the samba clients in android can connect and see both shared directories but when i access them (login: root/dietpi or dietpi/dietpi), i get “Access denied”.
I uninstalled/reinstalled samba, I forced SMB3 ( sudo sed -i “/\[global\]/a client min protocol = SMB3” /etc/samba/smb.conf ) but the issue remains.
any advice?
[global]
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
short question. Is “dietpi” still the standard password you are using to login via ssh? Or did you changed it during initial setup? If it was changed, pls try that one. At least for me it is User= dietpi and my own PW. not that standard one.
hi, i did not modify anything.
default usernames and passwords.
root/dietpi seems to be the default login in my case even the dietpi version is 6.26.3.
I tried with the default settings initially.
due to my userdata is located in the external usb disk, i added the last lines.
i will try later from my win10 laptop .
[storage]
comment = USB HDD
path = /mnt/76D062D4D0629A5F/dietpi_userdata
browseable = yes
create mask = 0775
directory mask = 0775
valid users = root
public = no
writeable = yes
Note that the dietpi install only creates a Samba password for dietpi user. Since you added the share with valid user = root you need to create a Samba password for it: smbpasswd -a root
And another thing is that userdata on external drive should actually not be a problem. The default location is symlinked to the external drive, hence still valid, as long as AppArmor or SELinux rules do not break symlinked access for Samba, when active.
Please assure that the /mnt/dietpi_userdata/ content that you want to share is owned by the dietpi user, respectively it has R/W permissions. I’m not sure how the Windows SMB client handles user/password entry, but it requires user dietpi and the global software password that you assigned on first login, “dietpi” by default.
You could also try it on a different dir and adjust the samba config accordingly, to test if there is really an access issue to the external drive somehow.
This is just the symlink, which has always root:root owner but 777 permissions, hence is global R/W accessible. Important is the target dir permissions:
ls -al /mnt/dietpi_userdata/
Okay yes userdata dir permissions look fine. Let me know if Windows still has issues, I never used it from there hence not sure about client specific needs.
I use the full path “\192.168.1.118\dietpi” but the access is denied.
maybe windows cannot identify some special characters (i had this issue 2 months ago, when i was trying smb share through dietpi).
Anyway, since android sharing is ok, i am fine at the moment.
Well, this was reason enough for me to register for an account to post… I installed SAMBA with no mods, no mods in user accounts or passwords, etc. About as vanilla as you can get. I’m getting the same “Access Denied” as the OP is. Just pointing out that it’s not user error as this seems to imply.