Win10 < Linux samba share: username/pw problem: denied <SOLVED>

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
VUMeter
Level 1
Level 1
Posts: 16
Joined: Tue May 15, 2018 12:19 pm

Win10 < Linux samba share: username/pw problem: denied <SOLVED>

Post by VUMeter »

I had issues earlier with sharing not working from Linux to Windows 10, but figured that out as it was due to the ufw blocking the connection.

So, now what I have is perfectly fine access with "guest ok = yes" for each share in smb.conf.
After adding "read only = no", and allowing the 'other' users write access (chmod o=rwx <path to share>) I could write files too.

However, I don't think it's really that secure leaving things with full guest access. Sure the ufw firewall only allows my one PC IP address on the LAN, and my router has MAC filtering, but it'd be nice for the extra layer of security of a password login to protect the Linux machine.

Everything I do does not work. Windows takes a strangely long time to pop up the credentials username/password box, and then fails with a Network Error: "Windows cannot access the share" with a 0x80004005 error.

I have my OS user "mintuser" with pw "password"
I have created a samba user "mintuser" with pw "password" [sudo smbpasswd -a mintuser]

smb.conf // all else is default

Code: Select all

[global]
   workgroup = <same as Win10 PC>

[share]
   comment = share
   path = /home/roshare
   valid users = mintuser
   read only = no
sudo pdbedit -L -v
shows mintuser is present

What gives? Is this a Windows thing?
Typing this "\\192.168.56.101\share" should get me to the share folder
Entering "mintuser" and username and "password" for password should work too, right?

So far, I have found a lot of out of date info, suggesting "security = user" which is depreciated. I'm now stuck.


As I have Linux in a VirtualMachine, running with a host-only adaptor, I am open to try all sorts here.

Windows 'host' is seen by Linux 'guest' at 192.168.56.1 (firewall rules open upd 137/138, tcp 139/445)
Linux 'guest' is seen by Windows 'host' at 192.168.56.101

Linux Mint 18.3 xfce with kernel 4.10.0-38-generic (default) and samba 4.3.11
Windows 10 Pro 1703 Creators

Thanks for any help
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
AMD Ryzen 1700x // ASRock X370 TaiChi // Zotac GTX1070 8GB Mini // 32GB (2x16) G.Skill Flare X
Samsung 850 Pro 256GB // Seagate Barracuda 7200 SATA // Seasonic Prime Titanium Ultra 750w
Fractal Design Define R5 // Noctua NH-U14S // Noctua NF-A14 PWM.
VUMeter
Level 1
Level 1
Posts: 16
Joined: Tue May 15, 2018 12:19 pm

Re: Win10 < Linux samba share: username/pw problem: denied <SOLVED>

Post by VUMeter »

Adding this line to the global section of smb.conf seemed to have done the trick.

"security = user"

Rebooted machines and now I have to enter the samba username and password.
The samba username and password are created by doing "sudo smbpasswd -a <username>", it'll then ask for the sudo password, then to enter a password for the samba username you just gave and to confirm new password.

The drive I wanted to access is owned by root, and is set to drwxrwxrwx, so if the last 3 items (other users) are different there might be issues accessing.

All seems well.
I have no idea why this seemed so hard for me to do. Maybe jumping between machines wasn't helping, and having both on one screen (use a VM) made for easier settings.
AMD Ryzen 1700x // ASRock X370 TaiChi // Zotac GTX1070 8GB Mini // 32GB (2x16) G.Skill Flare X
Samsung 850 Pro 256GB // Seagate Barracuda 7200 SATA // Seasonic Prime Titanium Ultra 750w
Fractal Design Define R5 // Noctua NH-U14S // Noctua NF-A14 PWM.
Locked

Return to “Networking”