Bug 527401 - smb4k's update of sudoers is not working
Summary: smb4k's update of sudoers is not working
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: smb4k
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Marcin Garski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-06 08:34 UTC by Ludwin Janvier
Modified: 2009-11-06 00:06 UTC (History)
1 user (show)

Fixed In Version: 0.10.4-1.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-06 00:06:20 UTC
Type: ---


Attachments (Terms of Use)

Description Ludwin Janvier 2009-10-06 08:34:51 UTC
Description of problem:
In its "superuser" settings, smb4k can add an entry in the sudoers file in order to make some /usr/bin/smb4k_* commands to work in sudo mode.

Fedora's sudoers defaults are to "requiretty" ; with this option, smb4k won't be able to execute its commands : it has to change the defaults.


Version-Release number of selected component (if applicable):
Name       : sudo                               
Arch       : i586                               
Version    : 1.7.1
Release    : 4.fc11

Name       : smb4k
Arch       : i586
Version    : 0.10.2
Release    : 1.fc11


How reproducible:
Always


Steps to Reproduce:
1. In smb4k, go to settings => superuser => and check "use superuser privileges to mount or umount shares". Give your root's password to smb4k_sudowriter
2. Mount any share 
3. "error : the share cannot be mounted/umounted"
  
Actual results:
sudo: sorry, you must have a tty to run sudo

Expected results:
The share to be mounted/umounted

Additional info:
Here's the thing :
smb4k_sudowriter is writing this entry to the sudoers :
# Entries for Smb4K users.
# Generated by Smb4K. Please do not modify!
User_Alias      SMB4KUSERS = myuser
Defaults:SMB4KUSERS     env_keep += "PASSWD USER"
SMB4KUSERS      myhost = NOPASSWD: /usr/bin/smb4k_kill
SMB4KUSERS      myhost = NOPASSWD: /usr/bin/smb4k_umount
SMB4KUSERS      myhost = NOPASSWD: /usr/bin/smb4k_mount
# End of Smb4K user entries.

In the first lines of this file, you'll find this :
Defaults    requiretty
We have to disable this "feature" (for SMB4KUSERS only, this is not a bug).

The only thing to do is to modify the Defaults's line in smb4k_sudowriter entry to get :
Defaults:SMB4KUSERS     env_keep += "PASSWD USER" , ! requiretty

And that's it ! With this little word, smb4k is just working fine again.

Comment 1 Fedora Update System 2009-10-24 11:16:58 UTC
smb4k-0.10.4-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/smb4k-0.10.4-1.fc11

Comment 2 Fedora Update System 2009-10-24 11:17:44 UTC
smb4k-0.10.4-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/smb4k-0.10.4-1.fc10

Comment 3 Marcin Garski 2009-10-24 11:21:02 UTC
Thanks for your report. Could you test if this is resolved in smb4k-0.10.4-1 release (when it hit testing repo)?

Comment 4 Fedora Update System 2009-10-27 06:37:31 UTC
smb4k-0.10.4-1.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update smb4k'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-10739

Comment 5 Fedora Update System 2009-10-27 06:48:24 UTC
smb4k-0.10.4-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update smb4k'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-10770

Comment 6 Fedora Update System 2009-11-06 00:06:10 UTC
smb4k-0.10.4-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2009-11-06 00:06:45 UTC
smb4k-0.10.4-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.