Bug 533743 - System-config Samba cannot add new user
Summary: System-config Samba cannot add new user
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-samba
Version: 12
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Nils Philippsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 523863 529291 552449 568345 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-08 21:17 UTC by Howard Ning
Modified: 2010-02-27 04:27 UTC (History)
7 users (show)

Fixed In Version: system-config-samba-1.2.86-1.fc12
Clone Of:
Environment:
Last Closed: 2010-02-27 03:33:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
adding a user from terminal (1.10 KB, text/plain)
2010-02-10 00:22 UTC, Flóki Pálsson
no flags Details

Description Howard Ning 2009-11-08 21:17:25 UTC
Description of problem:
When I add a new user in Preference -> Samba User -> Add and finish writing the user info and press OK. The window halt and I get this info:
Traceback (most recent call last):
  File "/usr/share/system-config-samba/addUserWin.py", line 174, in on_add_user_ok_button_clicked
    elif self.samba_backend.userExists(unix_name):
  File "/usr/lib/python2.6/site-packages/scsamba/dbus/proxy/sambaBackend.py", line 88, in userExists
    return self.dbus_interface.userExists (user)
  File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Traceback (most recent call last):
  File "/usr/share/system-config-samba/addUserWin.py", line 174, in on_add_user_ok_button_clicked
    elif self.samba_backend.userExists(unix_name):
  File "/usr/lib/python2.6/site-packages/scsamba/dbus/proxy/sambaBackend.py", line 88, in userExists
    return self.dbus_interface.userExists (user)
  File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[Liberty@Liberty ~]$ system-config-samba 
Traceback (most recent call last):
  File "/usr/share/system-config-samba/addUserWin.py", line 174, in on_add_user_ok_button_clicked
    elif self.samba_backend.userExists(unix_name):
  File "/usr/lib/python2.6/site-packages/scsamba/dbus/proxy/sambaBackend.py", line 88, in userExists
    return self.dbus_interface.userExists (user)
  File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

Version-Release number of selected component (if applicable):
1.2.83-1.fc12

How reproducible:


Steps to Reproduce:
1. Open system-config-samba
2. Add new user
3. Write user name and pass, press OK
  
Actual results:
Crash

Expected results:
New user added

Additional info:
This is the New install of Fedora 12 RC3.

Comment 1 Nils Philippsen 2009-12-30 17:20:41 UTC
Please check whether you see this issue with current SELinux policy. Thanks.

Comment 2 Howard Ning 2009-12-30 17:56:52 UTC
My SELinux is not enabled.

Comment 3 Nils Philippsen 2009-12-31 10:22:35 UTC
And, can you reproduce this still?

Comment 4 Howard Ning 2009-12-31 13:56:50 UTC
Yes, I can reproduce in my x86-64 install with latest update and i686 vm too. The smb daemon is started. I can add user by smbpasswd -a.

Comment 5 Roman Rakus 2010-02-01 16:20:26 UTC
I have similar issue in system-config-kdump. NoReply is from dbus when you are using synchronous communication. You should use asynchronous communication. I'm trying to do it in s-c-kdump, but without success so far. Maybe there is something bad in python-slip or in my implementation. Nils can you please try to implement async here?

Comment 6 Nils Philippsen 2010-02-03 12:21:07 UTC
(In reply to comment #5)
> I have similar issue in system-config-kdump. NoReply is from dbus when you are
> using synchronous communication. You should use asynchronous communication. I'm
> trying to do it in s-c-kdump, but without success so far. Maybe there is
> something bad in python-slip or in my implementation. Nils can you please try
> to implement async here?    

I have successfully used async method calls with dbus and slip.dbus already, using slip doesn't really interfere here. The wrappers installed by slip.dbus are completely agnostic of anything like timeouts.

I'm not really sure if the problem seen here is caused by dbus timeouts -- they are 25 seconds by default, so the user would have to notice a delay anyway.

Since replacing everything with async methods isn't really feasible in a short timeframe, I'll use monkey-patched versions of dbus.SystemBus (found in slip.dbus.bus) which in turn use monkey-patched proxy objects which default to no timeout for method calls (or a very long one -- about 49 days IIRC -- with older dbus versions) thereby making them blocking (as would a direct method call without dbus in between).

Comment 7 Nils Philippsen 2010-02-03 14:00:10 UTC
*** Bug 529291 has been marked as a duplicate of this bug. ***

Comment 8 Fedora Update System 2010-02-09 11:20:06 UTC
system-config-samba-1.2.84-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/system-config-samba-1.2.84-1.fc12

Comment 9 Fedora Update System 2010-02-09 20:59:34 UTC
system-config-samba-1.2.84-1.fc12 has been pushed to the Fedora 12 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 system-config-samba'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1666

Comment 10 Flóki Pálsson 2010-02-10 00:22:57 UTC
Created attachment 389874 [details]
adding a user from terminal

Same result
[floki@flokipa ~]$ rpm -q system-config-samba
system-config-samba-1.2.84-1.fc12.noarch

See attachment.

( additional info: I got bitten by xorg 563101 )

Comment 11 Nils Philippsen 2010-02-10 11:42:50 UTC
Oh. I've forgotten to actually set the dbus timeout to "no timeout". I've built 1.2.85 which should hit updates-testing shortly, please test when you can.

Comment 12 Christoph Wickert 2010-02-10 17:27:27 UTC
Still no luck with 1.2.85. The backtrace is gone, but the UI just freezes. I have the latest selinux-policy from updates-testing and even tried in permissive mode.

Comment 13 Nils Philippsen 2010-02-10 18:43:06 UTC
(In reply to comment #12)
> Still no luck with 1.2.85. The backtrace is gone, but the UI just freezes. I
> have the latest selinux-policy from updates-testing and even tried in
> permissive mode.    

Please run /usr/share/system-config-samba/system-config-samba-mechanism.py from the command line as root, then start system-config-samba and report if there are any error messages by the former.

Comment 14 Christoph Wickert 2010-02-10 19:02:46 UTC
# /usr/share/system-config-samba/system-config-samba-mechanism.py
Running system-config-samba dbus service at 'org.fedoraproject.Config.Samba'.
ERROR:dbus.service:Unable to append () to message with signature b: <type 'exceptions.TypeError'>: More items found in D-Bus signature than in Python arguments
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 586, in msg_reply_handler
    reply_handler(*message.get_args_list(**get_args_opts))
  File "/usr/lib/python2.6/site-packages/slip/dbus/polkit.py", line 306, in reply_cb
    reply_handler(is_authorized)
  File "/usr/lib/python2.6/site-packages/slip/dbus/service.py", line 134, in reply_handler
    reply_cb()
  File "/usr/lib/python2.6/site-packages/dbus/service.py", line 663, in <lambda>
    keywords[return_callback] = lambda *retval: _method_reply_return(connection, message, method_name, signature, *retval)
  File "/usr/lib/python2.6/site-packages/dbus/service.py", line 252, in _method_reply_return
    reply.append(signature=signature, *retval)
TypeError: More items found in D-Bus signature than in Python arguments

Comment 15 Nils Philippsen 2010-02-11 08:12:42 UTC
*** Bug 523863 has been marked as a duplicate of this bug. ***

Comment 16 Nils Philippsen 2010-02-11 09:31:15 UTC
It seems I can finally reproduce this.

Comment 17 Nils Philippsen 2010-02-11 11:13:07 UTC
This was a nasty one:

The method scsamba.core.SambaBackend.userExists() returned no value if a Samba user didn't exist already. This is perfectly okay in Python (it evaluates to False in Boolean expressions), but when wrapped in a dbus service method, the dbus message handling stumbles over this because it expects the return value to be a boolean type (which it isn't, the value None is of type NoneType).

I've fixed this in 1.2.86 which is building right now. Thanks for your patience ;-).

Comment 18 Christoph Wickert 2010-02-11 11:23:03 UTC
http://koji.fedoraproject.org/koji/buildinfo?buildID=155599
works fine, thanks a lot!

Comment 19 Nils Philippsen 2010-02-11 11:41:59 UTC
Submitted 1.2.86 for updates-testing.

Comment 20 Sean 2010-02-11 18:13:56 UTC
Download 1.2.86 from Koji and works for me too!
Thanks

Comment 21 Fedora Update System 2010-02-12 04:48:41 UTC
system-config-samba-1.2.86-1.fc12 has been pushed to the Fedora 12 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 system-config-samba'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1666

Comment 22 Nils Philippsen 2010-02-26 10:15:40 UTC
*** Bug 552449 has been marked as a duplicate of this bug. ***

Comment 23 Nils Philippsen 2010-02-26 10:16:01 UTC
*** Bug 568345 has been marked as a duplicate of this bug. ***

Comment 24 Fedora Update System 2010-02-27 03:33:24 UTC
system-config-samba-1.2.86-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 25 Michael Greis 2010-02-27 04:27:04 UTC
Thank you. I've just installed FC 12 and am trying to set it up.  I tried updating system-config-samba but the standard repositories didn't show it.  I just noticed your last entry indicating it was just pushed to the stable repository.  I still didn't see it there, so I installed it from the updates-testing per your comment #21.  That worked.  Thanks again!


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