I have samba set up and my Windows PC can see and read the files. But I have a media player that I use, when I try to go to the samba share it sees the shared drive and asks for the login. I use the samba user and password but I get login fails.
My smb.conf
[global]
workgroup = SAMBA
security = user
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
cups options = raw
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775
[WDBlue4TB]
comment = WDBlue4TB
path = /mnt/33d86236-f42b-4fd9-a984-cf5b9113773f/
read only = yes
guest only = no
guest ok = yes
share modes = yes`Preformatted text`
Hi @jjis2020! Welcome to Ask Fedora! Please have a look at the introductory posts in the #start-here category if you haven’t had a chance to do so.
Which of your samba shares do you try to connect your media player to? Is it WDBlue4TB?
I’ve seen that when you have guest login enabled (as you do for WDBlue4TB) some samba clients still won’t connect without some username and password. I usually enter something like guest for login and guest for password – and I don’t have user named guest on my samba server.
Please try if this works for you, and if not – then I’d suggest looking through samba logs to troubleshoot the issue.
To increase log verbosity you can add log level = 3 (or even more – up to 10) to the [global]* section of your smb.conf file. Remember to remove or comment this line after you’ve debugged your problem as verbose samba logging can consume hard drive space quite quickly (for higher logging levels).
Also this page on samba wiki details how to enable logging for one client only (your media player in your case).
One other obvious solution would be to add a real user account specifically for your medial player’s use – though generally it’s not needed. But at the same time it’s more secure – even in your home network – which is always a plus.
@jjis2020, first of all, I’m not an expert on samba configuration, I’ve done it several years ago and it’s working for me since with some minor tweaking like adding new shares/folders or/and users – so I know it’s not that hard to do Sadly I don’t have ready answers and quick solution for you – but I can help you debug this and hopefully make this work.
I don’t know such a tutorial from the top of my head. You won’t need to add something specific for media player, you’ll add just an ordinary user account (from Linux/samba perspective). It’s not that hard to do, but it’s definitely more work than just connecting using guest account. Also it sort of pointless from the security point of view – I think so – if you’ll leave guest/passwordless access to other clients (including Windows).
So it makes sense to do one of the (from simple and insecure to harder and more secure):
No login/password required to access your shares. You’re on a home network, you understand potential risks, you’re ok with them and don’t want the hassle.
You don’t want a fully open and accessible to anyone shares, so you make one samba account and use it on all your clients.
You add different accounts for different clients, possibly with different clients having access to different resources.
So I’ll suggest you to choose one of this “strategies” and then we can go from there.
On the how-to front you may want to look here:
and maybe here as well:
Regarding log file you’ve posted.
Is it with log level = 3 or more?
It looks like samba says NT_STATUS_NO_SUCH_USER – i.e. it doesn’t know user which is used to connect. Definitely guest/guest doesn’t work, I can’t say from the log if the same happens when you mediplayer tries to connect without username and password.
I believe NO_SUCH_USER thing can be amended with adding these parameters to smb.conf – to global section and share-specific section respectfully:
[global]
map to guest = Bad User
guest account = existing_samba_account_name
[share]
force user = existing_samba_account_name
create mask = 0664
directory mask = 0775
Also for additional testing I recommend doing this on you Fedora box. Install samba-client if it isn’t already installed:
sudo dnf install samba-client
Use smbclient to test your connection to samba resources from cli. I assume that your Fedora box is your samba server and that you’re trying to connect mediaplayer to WDBlue4TB share. To try to connect as guest:
smbclient --user guest //localhost/WDBlue4TB
Enter guest's password:
Test both entering “guest” as the password and – separately – just pressing enter (i.e. using empty password).
Second test is for no username:
smbclient --user "" //localhost/WDBlue4TB
You’ll most likely receive answer NT_STATUS_NO_SUCH_USER – please post if you did, or did you connect, or which other answer did you receive.
If you’ll connect successfully you’ll see something like
Type ls here to see a directory listing. By the way, if you have problems with user access rights – you’ll see it after entering ls on this step. When all is working ok – you’ll see a directory/files listing.
Press [Ctrl-D] or type exit to disconnect and return to you cli.
Have you added user to “security” group, as per instruction?
Test login with smbclient as we did earlier (using newly created username and password for restricted mode) and note samba’s answer if you can’t login.