Samba

Rating: 
4.272725
Your rating: None Average: 4.3 (11 votes)

Samba compiled and packaged for SailfishOS.

WARNING: This is affected by SambaCry ( https://www.samba.org/samba/security/CVE-2017-7494.html ) and there won't be any more updates!

https://vimeo.com/131754067

FAQ

Question: What's this for?
Answer: This allows fast and simple file sharing between your Jolla phone and Windows clients.

Question: When I click on your app icon the "app card" shows for a moment, then closes!
Answer: That's expected. You should have a new notification that Windows share has either been enabled or disabled, cause that's what the icon is for. At best use it as a shortcut (as shown at the screenshots).

Question: How to create a shortcut?
Answer: Open the Settings app. There go to System -> Shortcuts. The rest should be self-explaining.

Question: Now that I have a shortcut I don't need the icon anymore. How to hide it?
Answer: Don't do it! Really, put it into some folder to hide it.

Question: I WANT TO HIDE THE ICON!!!
Answer: Okay, you do this on your own risk. No support from me! As root open /usr/share/applications/samba.desktop and add the line
NoDisplay=true
You might have to reboot your phone for the change to take effect.

Question: This did place a .trackerignore into my ~/Public folder. I don't want that but can't delete that file (even tried as root) !
Answer: That's by design. This file will stop the tracker from reindexing the Public folder every time a file has been changed remotely. Also as this is public access people might upload things you don't want (or better: Want to review before adding) into your media library. The reason you can't delete this file is that write rights have been removed so it can't be deleted from a samba client. If you really want to delete that file do: chmod +w ~/Public/.trackerignore && rm ~/Public/.trackerignore

Question: How do I add more shared folders?
Answer: Sorry but this is the wrong place to ask this question. Have a look at https://www.samba.org/samba/docs/ for example.

Question: How to add printers?
Answer: Tell me how to physically connect a printer to your phone before asking that question. Seriously: Printer support is disabled (this might change when the Jolla Tablet comes out).

Question: Why are you using the deprecated NetBIOS instead of Active Directory?
Answer: Cause Active Directory support needs dependencies not available in any repo. Now I could provide the deps but while being deprecated NetBIOS still works just fine so why should I trash your space?

Like what you see? Feel free to Donate by PayPal

Screenshots: 
Changelog: 

* Tue May 01 2018 V10lator <v10lator@myway.de> 4.2.2-4
- EXPERIMENTAL: Fix dependency list.

* Fri Jun 26 2015 V10lator <v10lator@myway.de> 4.2.2-3
- Fix Changelog.
- Fix nmbd in no-network situations.

* Fri Jun 26 2015 V10lator <v10lator@myway.de> 4.2.2-2
- Fixed UI toggle.

* Mon Jun 22 2015 V10lator <v10lator@myway.de> 4.2.2-1
- First build.

Comments

lpr's picture

SambaCry CVE-2017-7494 ALERT: don't provide old version 4.2.2 (vulnerable to SambaCry CVE-2017-7494 cvss-Score 9.8Critical). Use Version 4.4.14 or higher instead!!

V10lator's picture

==========
Workaround
==========

Add the parameter:

nt pipe support = no

to the [global] section of your smb.conf and restart smbd. This
prevents clients from accessing any named pipe endpoints. Note this
can disable some expected functionality for Windows clients.

(Source: https://www.samba.org/samba/security/CVE-2017-7494.html )

TamarindoJuice's picture

"Nothing provides pkgconfig (ldb)"

TamarindoJuice's picture

Not "sambing" here. I can't install it same after installing the Python modules

V10lator's picture

Any error message?

dirksche's picture

Did you include the python-dbus? Ahh. You updated the dependence list. How could that break everything?

V10lator's picture

In the past I builded the packages on a Sailfish OS device directly. This time I did it on a x86 mashine, tricking the buildtool into thinking it is an ARM mashine. Also I couldn't test it at all.

dirksche's picture

Yeah. Thanks a lot. pkcon install dbus-python was the solution.

V10lator's picture

I tried to make a new package based on that information. It will either fix the problem or break everything.

dirksche's picture

Thanks. I'm already looking for this package

dirksche's picture

Thanks a lot for your fast answer. It's a pitty that a lot of great developers leave SailfishOS behind.
When I try sudo -E /usr/sbin/V10sambatoggle.sh the output is ImportError: no module named dbus On my Jolla1 notification works. Maybe there is something different in Sailfish X
Edit: sudo is installed

V10lator's picture

Please look for a package containing python-dbus as it seems you're missing that.

//EDIT: https://talk.maemo.org/showpost.php?p=1405354&postcount=21

dirksche's picture

Do you still give support? I use your program on a Xperia X. It works, but no notification whether its enabled or disabled. It was the same on my jolla1. But after version --dup some packages were installed and everything was fine. But here nothing helps. Do you have any idea?

V10lator's picture

Sorry to say but all my SailfishOS devices are defective today, so I can't give any support. :(

If you have some exerience with srcripting this might help you to debug the issue for yourself: https://openrepos.net/comment/8582#comment-8582 - I guess there's some incompatibility with newer SailfishOS versions in /usr/sbin/V10sambatoggle.sh

//EDIT: Also make sure https://openrepos.net/content/v10lator/sudo (or the one from mer-tools) is installed! IIRC it should be auto-installed but you never know.

Ingvix's picture

Does this allow me to use files from my pc's shared folders or does this only make shared folder for Jolla? Also, I don't have anything called Shortcuts in the system section in the settings.

V10lator's picture

It makes a shared folder for Jolla.

Shortcuts have been removed with SfOS 2.0

M_Bln's picture

I always get status-info "enabled", no matter how often I start the app.
I havent tried to connect from win via samba yet. So I dont know if it not enables or if it not disables...
What can I do to check what's wrong?

V10lator's picture

Thanks for your report.

If you have developer mode enabled open a terminal or ssh session, then execute
sudo -E /usr/sbin/V10sambatoggle.sh
Post back the result.

After that do
devel-su
to gain root rights and execute
systemctl status -l smb nmb
then post back the results, too.

//EDIT: In case your highly experienced and want to debug this for yourself, here the chain:
/usr/share/applications/samba.desktop (application icon) -> sudo (switch from nemo to root) -> /usr/sbin/V10sambatoggle.sh (check and handle state) -> /bin/systemctl (start or stop nmbd and smbd).

//EDIT²: And an explaination what the commands I gave you do: The first one bypasses the application icon and starts sudo directly (it also tells sudo what to do next, just like the application icon would do). That way we see error messages that would normally be hidden by the UI. Then the systemctl command just checks if nmbd and smbd have been started and if not it prints out any errors that might have been occured.

Viskari's picture

ok, so i reinstalled to 4.2.2.2 and installation was fine but when pressing windows share icon nothing happens, the "app card" shows up for a few seconds then disappears.

Marchusch's picture

I have a similar situation connecting to a laptop running Ubuntu 15.04. Even without the notification, "Jolla" still shows up in Nautilus under windows network and I was able to transfer a file to the phone.

Edit: Since first establishing a connection between my phone and my laptop, a direct link to "public on jolla" has appeared in my file manager. In that regard things basically work nicely. Only problem is I can't easily tell if sharing is enabled or not (because of missing notifications).

V10lator's picture

So you don't got a new notification that it has been enabled? If you have developer mode enabled please open the Terminal (or connect via ssh), get root rights by executing devel-su, then give me the results of the following commands:

systemctl status -l smb nmb
/usr/sbin/V10sambatoggle.sh
pkcon search name samba

After that type exit to change back from root to nemo and execute:

sudo -E /usr/sbin/V10sambatoggle.sh

Don't forget to give me the result of that, too.

//EDIT: If you get the notification try to connect (keep in mind that NetBIOS may take some time to announce you to the windows machines) and if it works: Everything is as expected. The icon won't open an app (just show the "app card" for a moment). It's meaned to be used as a shortcut to start/stop samba (see screenshots).

//EDIT²: Added one more command to execute as root.

V10lator's picture

For everyone who had 4.2.2-1 installed and couldn't use the UI toggle: Update to 4.2.2-2.

Viskari's picture

Hi
I'd like try this application but when trying to install from warehouse this information pops up: status:dep-resolution-failed and that nothing provides sudo.

V10lator's picture

Thanks for your report. I didn't realize that sudo was from mer-tools, which is a 3rd party repo. Anyway, I mirrored the sudo rpm, so now it should work (update repo, then try to install again).

//EDIT: I wouldn't suggest to use sudo from NielDKs repo: It's 10x the size of the mer-tools version while it doesn't seem to bring any benefits (that's why I mirror mer-tools, not NielDK).

Larswad's picture

Good, I stand corrected. Removing my suggestion about NielDK's version.

 

Larswad's picture

You should add the mer-tools repo for jolla manually in the terminal using:

 
$ devel-su
# ssu ar mer-tools
# ssu ur
$ pkcon refresh