Page 1 of 1

Samba's GUI failure

Posted: Thu Nov 14, 2013 7:40 am
by davekimble
I am used to using Lubuntu 13.04, so Raspbian (2013-09-25-wheezy-raspbian.zip) is very familiar.
For all the boxes on the LAN to play nicely together, they need to network share in the same way,
so I installed samba, but the configuration GUI did not appear in Menu > System Tools > Samba , or any other place I can find.
On Lubuntu I can see /usr/share/applications/system-config-samba.desktop
but on Raspbian there's no corresponding .desktop file .

So I edited Lubuntu//usr/share/applications/system-config-samba.desktop to Raspian//home/pi/.local/share/applications/system-config-samba.desktop :
======
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Samba
Comment=Create, modify, and delete samba shares
Categories=System;Settings;
Icon=system-config-samba
Exec=gksu system-config-samba
Type=Application
StartupNotify=true
Terminal=false
=======
and now it appears in Menu > System Tools > .

When I run it, I get a dialog saying I didn't have to authenticate, but we are running as root.
And then nothing else happens.

So trying the .desktop's "Exec=" line at the command line:
======
pi@raspberrypi ~ $ gksu system-config-samba
(gksu:11767): GLib-CRITICAL **: g_str_has_prefix: assertion `str != NULL' failed
pi@raspberrypi ~ $
======

So I tried:
======
pi@raspberrypi ~ $ gksu system-config-samba --debug
No ask_pass set, using default!
xauth: /tmp/libgksu-W5nQSq/.Xauthority
STARTUP_ID: gksu/system-config-samba/14714-0-raspberrypi_TIME0
cmd[0]: /usr/bin/sudo
cmd[1]: -H
cmd[2]: -S
cmd[3]: -p
cmd[4]: GNOME_SUDO_PASS
cmd[5]: -u
cmd[6]: root
cmd[7]: --
cmd[8]: system-config-samba
buffer: -sudo-
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: --
buffer: -: system-config-samba: command not found-
buffer: --
buffer: --

[30 more of these here]

buffer: --
brute force GNOME_SUDO_PASS ended...
No password prompt found; we'll assume we don't need a password.
Calling pass_not_needed window...
xauth: /tmp/libgksu-W5nQSq/.Xauthority
xauth_env: /home/pi/.Xauthority
dir: /tmp/libgksu-W5nQSq

(gksu:14714): GLib-CRITICAL **: g_str_has_prefix: assertion `str != NULL' failed
pi@raspberrypi ~ $
=======

I did try some other options, but didn't get anywhere, and I didn't get the Samba Server Configuration GUI to appear.

It seems to be a problem with not needing to authenticate.
I am very reluctant to edit /etc/samba/smb.conf without assistance.
If I could just make /home/pi/Public/ shared, that would do for a start.

Re: Samba's GUI failure

Posted: Thu Nov 14, 2013 8:17 am
by MoosePi
There are several Samba GUI http://www.samba.org/samba/GUI

An overview of Samba Sharing etal: http://elinux.org/R-Pi_NAS

gadmin-samba seems like a fully featured Samba GUI !

Re: Samba's GUI failure

Posted: Thu Nov 14, 2013 1:46 pm
by klricks
Samba does not have a built in GUI. You have to install a 3rd party GUI (configuration tool) as a package.
Search the repository for [samba config]

Re: Samba's GUI failure

Posted: Fri Nov 15, 2013 12:55 am
by DougieLawson
Just a quick observation.

If you're trying to share between Linux systems then I've found that NFS is easier to use than samba. In my network ALL of the Linux machines use NFS, one of the Linux systems runs samba so that our Windows laptops can see the shared NFS drives.

Re: Samba's GUI failure

Posted: Fri Nov 15, 2013 3:58 am
by davekimble
Thanks for those suggestions - this rant is not aimed at you.

If Samba doesn't have a GUI, what is system-config-samba ?
Admittedly it doesn't work, but it exists, and the script seemed to be going OK until
"(gksu:11767): GLib-CRITICAL **: g_str_has_prefix: assertion `str != NULL' failed"
- whatever that means.

I installed gadmin-samba, but when I tried to "apply" my new share it said it "couldn't do it for now", and "now" never came. And what an appalling layout - who writes this stuff? The system-config-samba that I am used to clearly doesn't do half of what gadmin-samba can do (if you know how to, and if you want to) but is quite adequate for what I want.

Yes, I suppose I could scrap samba on six Linux machines, and use NFS instead, but after looking at https://help.ubuntu.com/community/SettingUpNFSHowTo , it would be much easier to throw the pi in the electronic trash, along with all the other good ideas that didn't quite work. Why do you have to do all that post-install command line stuff anyway? You don't have to do it in Windows.

Re: Samba's GUI failure

Posted: Fri Nov 15, 2013 6:38 am
by ghans
davekimble wrote: buffer: -: system-config-samba: command not found-
OK , its pretty stupid that this message only appears in debug
mode.

system-config-samba is not part of Debian it seems, so it won't
be in the Raspbian repos either.
davekimble wrote: Why do you have to do all that post-install command line stuff anyway? You don't have to do it in Windows.
I guess it's because Linux ... isn't Windows ? How would you
setup a headless Samba server on Windows ? Why do you need
to start a GUI on a headless server ? I don't need to do that on
Linux.

Did you try starting gadmin-samba via gksu ?

ghans

Re: Samba's GUI failure

Posted: Sun Nov 17, 2013 12:21 am
by davekimble
> Did you try starting gadmin-samba via gksu ?

I had to, as the .desktop file for it fails "You must be root to run this" - even though that's always true, and when it gets to authentication for root it says I don't have to.

Anyway, I don't know what I've done, but I can access ~/Public now from other machines with
smb://pi@samba24/pi/pi/Public/
which is grotesque but usable.
/etc/samba/smb.conf and smbusers seem to have been updated when gadmin-samba closed, so perhaps that's the trick.

Re: Samba's GUI failure

Posted: Mon Feb 10, 2020 2:18 am
by allanonmage
davekimble wrote:
Fri Nov 15, 2013 3:58 am
Thanks for those suggestions - this rant is not aimed at you.

If Samba doesn't have a GUI, what is c ?
Admittedly it doesn't work, but it exists, and the script seemed to be going OK until
"(gksu:11767): GLib-CRITICAL **: g_str_has_prefix: assertion `str != NULL' failed"
- whatever that means.

I installed gadmin-samba, but when I tried to "apply" my new share it said it "couldn't do it for now", and "now" never came. And what an appalling layout - who writes this stuff? The system-config-samba that I am used to clearly doesn't do half of what gadmin-samba can do (if you know how to, and if you want to) but is quite adequate for what I want.

Yes, I suppose I could scrap samba on six Linux machines, and use NFS instead, but after looking at https://help.ubuntu.com/community/SettingUpNFSHowTo , it would be much easier to throw the pi in the electronic trash, along with all the other good ideas that didn't quite work. Why do you have to do all that post-install command line stuff anyway? You don't have to do it in Windows.
My thoughts exactly! Even here in the future, system-config-samba is not installable by apt-get.