pi_nl
Posts: 2
Joined: Sun Jan 14, 2018 8:23 pm

Samba without password but with allowed ip

Sun Jan 14, 2018 8:54 pm

This is my first post and i`m linux novice. After a lot of trial and error and reading fora, i have my pi working as i wanted :D
I still have a question about the samba share that is running on the pi.

I installed "Stretch", then an automount with NTFS-3G for my usb-disk. The vpn client that is use was installed, just as Transmission. And finally it all works. Now i want to be able to play the downloaded media on my antique mediaplayer. The only way to get this working was, to make it not-password protected. So i edited the samba config. I noticed that there was a lot of documentation inside the config-file and i kept everything at default and added the next text:

Code: Select all

[media]
comment=media
path=/mnt/usb
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=Yes
hosts allow = 192.168.0.11/24 192.168.0.12/24
interfaces = lo eth0
bind interfaces only = Yes
writeable=Yes, so that i can edit from my desktop
public=Yes, because it was in the tutorial :)
only guest=no, same reason as above
hosts allow = 192.168.0.11/24 192.168.0.12/24 11 is the desktop and 12 is the player
interfaces = lo eth0
bind interfaces only = Yes , because the pi is connected to a openvpn-server as well.

I tried to connect to the share from other clients in the network but the connection is refused. My desktop and the mediaplayer can connect to [media].

Is this a right way for a configuration?

User avatar
DougieLawson
Posts: 33348
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Samba without password but with allowed ip

Mon Jan 15, 2018 1:16 am

After Wannacry any modern/supported version of Windows won't allow CIFS/Samba shares without a password (as that was the vector for infection with that virus/trojan/ransomware).
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

beta-tester
Posts: 1207
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Samba without password but with allowed ip

Mon Jan 15, 2018 2:22 pm

BTW: to me it looks like you accidentally added some [global] section parameter to your [media] section. see man page of smb.conf:

Code: Select all

[email protected]:~$ man smb.conf
...
PARAMETERS
       Parameters define the specific attributes of sections.
       Some parameters are specific to the [global] section (e.g., security)...
       The letter G in parentheses indicates that a parameter is specific to the [global] section... 
bind interfaces only (G)...
interfaces (G)...
{ I only give negative feedback }
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, RPi2B (1GB), 64GB microSDXC1 class 10, HDMI 1920x1080, keyboard-mouse-combo (wireless), PiCamera, ethernet-cable, 5V/1.2A power supply, Wifi dongle (rt5370)

pi_nl
Posts: 2
Joined: Sun Jan 14, 2018 8:23 pm

Re: Samba without password but with allowed ip

Mon Jan 15, 2018 7:15 pm

DougieLawson wrote:
Mon Jan 15, 2018 1:16 am
After Wannacry any modern/supported version of Windows won't allow CIFS/Samba shares without a password (as that was the vector for infection with that virus/trojan/ransomware).
That`s true, i remember i was asked for a user/pass once. I logged in with pi/password. My old mediaplayer did not ask for any, but it guess it`s running linux.

beta-tester wrote:
Mon Jan 15, 2018 2:22 pm
BTW: to me it looks like you accidentally added some [global] section parameter to your [media] section. see man page of smb.conf:

Code: Select all

[email protected]:~$ man smb.conf
...
PARAMETERS
       Parameters define the specific attributes of sections.
       Some parameters are specific to the [global] section (e.g., security)...
       The letter G in parentheses indicates that a parameter is specific to the [global] section... 
bind interfaces only (G)...
interfaces (G)...
Yes! thanks, i moved that part to [global]

Return to “Raspbian”

Who is online

Users browsing this forum: No registered users and 24 guests