Raspberry 3, Openhabian, remote access to config from windows

I hope somebody can help me out here…

I’m definetely not a Linux expert, since I normally uses Windows. I would like to maintain my items-, sitemap- etc files from at windows machine, and I discovered that Samba shares are pre-installed on the Raspberry 3 / Openhabian combo.

Perfect - ready to go… NOT!

They are READ/ONLY (the shares) so I can see all files, but not save anything?!?!?
What EXACTLY should I do. I’m currently logging in to the pre-installed openHAB-conf share as openhabian:openhabian and I can see and read all files - but all save operations fail.

HELP HELP! Please write a STEP-BY-STEP guide to solve this…

Thanks in advance,

Thomas

It sounds like you are trying to access these files with the wrong user. When you try to access your samba share, windows should ask you for a username and password. Use the same you use to access your raspberry and try it that way. I don’t use openhabian, so if this does not work, maybe read the instructions again if it requires a different user and password.
I stumbled across the same issue once in a while…my problem was always related to using the wrong user.
Sorry, I am not on windows, that’s as much details i can give you.
Hope that helps

Thanks lipp, but the problem was not related to wrong user, but “strange” sharings setup by the Openhabian image.

Everything works now - and here is exactly what I did to fix it:

  1. Putty into the raspberry
  2. (Optional) Make a copy of the smb.conf file by running: sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
  3. Edit the samba configuration by running: sudo nano /etc/samba/smb.conf
  4. Navigate all the way to the end of the file (you should see a lot of sections with ; as the first char in the lines - these sections are commented out.
  5. Delete ALL the sections after the ========== Custom Share Definitions =========== line
  6. Insert the following two shares:

#=================== Custom Share Definitions ====================
[openHAB2-userdata]
comment=openHAB2 userdata
path=/var/lib/openhab2
browseable=Yes
writeable=Yes
only guest=no
public=no
create mask=0777
directory mask=0777

[openHAB2-conf]
comment=openHAB2 site configuration
path=/etc/openhab2
browseable=Yes
writeable=Yes
only guest=no
public=no
create mask=0777
directory mask=0777

  1. Press ctrl+x to exit the editor (remember to save smb.conf).
  2. Restart the samba servce by running: sudo systemctl restart smbd.service
    8B) Optionally, reboot the Raspberry by running: sudo reboot

— on the windows PC —

  1. In the explorer enter \<ip-address-of-raspberry\ and press enter
  2. You should see the list of shares
  3. Right-click the “OpenHAB2-conf” share and select “Map Network Drive”. (This is important)
  4. In the dialog select a drive (e.g. Z:) and check “Connect using different credentials”
  5. Enter the credentials as (username:password) openhabian:openhabian
  6. Finish the drive mapping and in drive Z: you should now see one folder with items, sitemaps, things… etc.

It is important NOT to use the \ directly since that will not work (wrong user and no write access).

Thomas

Hi,

I’m very new in the topic of openHAB and I have the same problem. No write access in the config share.

I tried the solution of Thomas, but with no positive result. Has somone a solution?

Thanks in advance,
Joachim