Shared folders fails to install NFS or Samba service

Bug #40563 reported by Alexander Kirillov
28
Affects Status Importance Assigned to Milestone
gnome-system-tools (Ubuntu)
Fix Released
High
Ubuntu Desktop Bugs

Bug Description

Steps to reproduce:
1. Launch "Shared folders"; it asks for your password.
2. You get the dialog "Shared service not installed"; which tells that you need to istall either Samba or NFS. Select "NFS" and click "Apply"
3. You get the warning "Not runing as root

The application will run in read-only mode. You will not be able to change the package database"
 and then the error message
"E: Could not open lock file /var/cache/apt/archives/lock - open (13 Permission denied)
E: Unable to lock the download directory"

As far as I understand, gst-tools tries to launch apt - but as a user, not via sudo, which naturally fails.

Revision history for this message
Chris (ubuntu-strabo) wrote :

I am seeing the same thing here on Dapper Beta (updated today - 27 April 2006). This system was upgraded from Breezy after the Dapper Beta release.

Probably obvious, but I thought I'd add that the same thing occurs if just Samba is selected, just NFS is selected, or both Samba and NFS are selected.

If neither option is selected, the "Not running as root. The application will run in read-only mode..." message still appears (?), and then the application exits.

Revision history for this message
Oliver Gerlich (ogerlich) wrote :

As this bug report is marked unconfirmed: I got the same results when using the Live CD Beta2 (ubuntu-6.06-beta2-live-i386.iso).

Revision history for this message
Alexander Kirillov (shurik179) wrote :

I think this bug should now have status changed to "confirmed". Can one of you guys do this?

Revision history for this message
Paul van Genderen (paulvg) wrote :

Severity Major, because it currently fails to work at all.

Changed in gnome-system-tools:
assignee: nobody → bugsquad
status: Unconfirmed → Confirmed
Revision history for this message
Paul van Genderen (paulvg) wrote :

Workaround: sudo shares-admin

Revision history for this message
Paul van Genderen (paulvg) wrote :

I've written a patch, and am now building it to test:

diff -r -u gnome-system-tools-2.14.0.orig/configure.in gnome-system-tools-2.14.0/configure.in
--- gnome-system-tools-2.14.0.orig/configure.in 2006-03-13 14:19:33.000000000 +0100
+++ gnome-system-tools-2.14.0/configure.in 2006-05-02 12:58:10.000000000 +0200
@@ -37,11 +37,11 @@
 dnl search for su
 dnl =====================================================

-AC_PATH_PROG(SU_TOOL, su)
+AC_PATH_PROG(SU_TOOL, sudo)
 if test x"${SU_TOOL}" = xno; then
- AC_MSG_ERROR([su executable not found in your path - should be installed])
+ AC_MSG_ERROR([sudo executable not found in your path - should be installed])
 else
- AC_DEFINE_UNQUOTED(SU_PATH, "${SU_TOOL}", [su executable path])
+ AC_DEFINE_UNQUOTED(SU_PATH, "${SU_TOOL}", [sudo executable path])
 fi

 dnl =====================================================
diff -r -u gnome-system-tools-2.14.0.orig/src/common/gst-auth.c gnome-system-tools-2.14.0/src/common/gst-auth.c
--- gnome-system-tools-2.14.0.orig/src/common/gst-auth.c 2006-01-30 23:40:32.000000000 +0100
+++ gnome-system-tools-2.14.0/src/common/gst-auth.c 2006-05-02 12:54:23.000000000 +0200
@@ -364,7 +364,7 @@
 void
 gst_auth_do_su_authentication (GstTool *tool)
 {
- gchar *su_args[5];
+ gchar *su_args[3];
  GString *command;

  command = g_string_new (NULL);
@@ -379,10 +379,8 @@

  /* these are the su args */
  su_args[0] = SU_PATH;
- su_args[1] = "root";
- su_args[2] = "-c";
- su_args[3] = command->str;
- su_args[4] = NULL;
+ su_args[1] = command->str;
+ su_args[2] = NULL;

  gst_auth_do_authentication (tool, su_args);
  g_string_free (command, TRUE);
Only in gnome-system-tools-2.14.0.orig/src/common: .gst-auth.c.swp

Revision history for this message
Paul van Genderen (paulvg) wrote :

Merde. No joy.

Revision history for this message
Paul van Genderen (paulvg) wrote :

I'm on to something

Changed in gnome-system-tools:
assignee: bugsquad → paulvg
status: Confirmed → In Progress
Revision history for this message
Paul van Genderen (paulvg) wrote :

Now testing this patch:

diff -r -u gnome-system-tools-2.14.0.orig/src/shares/shares.desktop.in.in gnome-system-tools-2.14.0/src/shares/shares.desktop.in.in
--- gnome-system-tools-2.14.0.orig/src/shares/shares.desktop.in.in 2006-01-30 23:18:46.000000000 +0100
+++ gnome-system-tools-2.14.0/src/shares/shares.desktop.in.in 2006-05-02 13:48:35.000000000 +0200
@@ -1,7 +1,7 @@
 [Desktop Entry]
 _Name=Shared Folders
 _Comment=Configure which folders are available for your network neighborhood
-Exec=shares-admin
+Exec=gksudo shares-admin
 Icon=@pixmapsdir@/shares.png
 Terminal=false
 Type=Application

Revision history for this message
Sebastien Bacher (seb128) wrote :

using gksudo will work for sure, that's what we were doing until some days ago. We will probably revert to that behaviour to get a consistant sudo dialog with other applications anyway

Revision history for this message
Paul van Genderen (paulvg) wrote :

Add this file to debian/patches (29_shares_gksudo.patch):

#! /bin/sh /usr/share/dpatch/dpatch-run
## 29_shares_gksudo.patch by Paul van Genderen <email address hidden>
##

@DPATCH@
diff -urNad gnome-system-tools-2.14.0~/src/shares/shares.desktop.in.in gnome-system-tools-2.14.0/src/shares/shares.desktop.in.in
--- gnome-system-tools-2.14.0~/src/shares/shares.desktop.in.in 2006-04-30 17:34:28.000000000 +0200
+++ gnome-system-tools-2.14.0/src/shares/shares.desktop.in.in 2006-05-02 14:01:00.000000000 +0200
@@ -1,7 +1,7 @@
 [Desktop Entry]
 _Name=Shared Folders
 _Comment=Configure which folders will be shared with others
-Exec=shares-admin
+Exec=gksudo --desktop %k shares-admin
 X-KDE-SubstituteUID=true
 Icon=gnome-fs-share
 Terminal=false

Put the name in 00list and build. Can someone in the bugsquad team please try this? WFM! (ofcourse it would be better to change 08_desktops_changes.dpatch, but that didn't wfm because of an md5sum error)

Changed in gnome-system-tools:
assignee: paulvg → bugsquad
Revision history for this message
Paul van Genderen (paulvg) wrote :

Thanks Sebastien

Revision history for this message
Sebastien Bacher (seb128) wrote :

This upload fixes the issue:

 gnome-system-tools (2.14.0-0ubuntu8) dapper; urgency=low
 .
   * debian/patches/08_desktops_changes.dpatch:
     - use gksu for the menu items again so the UI is consistent with the other
       applications of the desktop (Ubuntu: #40680)
     - make package installation working again (Ubuntu: #40563)
   * debian/patches/20_use_sudo_user.dpatch:
     - patch by Dennis Kaarsemaker <email address hidden>
     - Use su -c $SUDO_USER for launching nautilus/totem/gnome-cd if that
       variable is set (Ubuntu: #23230)
   * debian/rules:
     - run "make pot" for the different doc directories of the package

Changed in gnome-system-tools:
assignee: bugsquad → desktop-bugs
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.