Bug 887591 - system-config-samba got AttributeError in Fedora 18
Summary: system-config-samba got AttributeError in Fedora 18
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-samba
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nils Philippsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 871961 892775 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-16 17:23 UTC by FENG Haibo
Modified: 2013-01-14 13:56 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-12-22 10:58:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description FENG Haibo 2012-12-16 17:23:08 UTC
Description of problem:
system-config-samba got no attribute in Fedora 18: 
for line in self.samba_users_file:
AttributeError: 'SambaBackend' object has no attribute 'samba_users_file'

Version-Release number of selected component (if applicable):
Fedora 18 Beta and updated to the latest by Dec 16

How reproducible:


Steps to Reproduce:
1. Installed Fedora 18 use livecd.
2. sudo yum install samba
3. sudo systemctl enable samba
4. sudo systemctl start samba
5. sudo yum install system-config-samba
6. launch system-config-samba and add a user
7. Click OK and get the error:
 [haibo@localhost sysutils]$ sudo system-config-samba
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Traceback (most recent call last):
  File "/usr/share/system-config-samba/addUserWin.py", line 184, in on_add_user_ok_button_clicked
    elif self.samba_backend.userExists(unix_name):
  File "/usr/lib/python2.7/site-packages/scsamba/core/sambaBackend.py", line 265, in userExists
    for line in self.samba_users_file:
AttributeError: 'SambaBackend' object has no attribute 'samba_users_file'
Traceback (most recent call last):
  File "/usr/share/system-config-samba/addUserWin.py", line 184, in on_add_user_ok_button_clicked
    elif self.samba_backend.userExists(unix_name):
  File "/usr/lib/python2.7/site-packages/scsamba/core/sambaBackend.py", line 265, in userExists
    for line in self.samba_users_file:
AttributeError: 'SambaBackend' object has no attribute 'samba_users_file'
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Traceback (most recent call last):
  File "/usr/share/system-config-samba/sambaUserWin.py", line 121, in onUsersOkButtonClicked
    self.samba_backend.writeSmbUsersFile()
  File "/usr/lib/python2.7/site-packages/scsamba/core/sambaBackend.py", line 184, in writeSmbUsersFile
    for line in self.samba_users_file:
AttributeError: 'SambaBackend' object has no attribute 'samba_users_file'
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Traceback (most recent call last):
  File "/usr/share/system-config-samba/sambaUserWin.py", line 121, in onUsersOkButtonClicked
    self.samba_backend.writeSmbUsersFile()
  File "/usr/lib/python2.7/site-packages/scsamba/core/sambaBackend.py", line 184, in writeSmbUsersFile
    for line in self.samba_users_file:
AttributeError: 'SambaBackend' object has no attribute 'samba_users_file'
 
Actual results:
Got AttributeError and the app doesn't exit.

Expected results:
user is added successfully

Additional info:

Comment 1 Nils Philippsen 2012-12-18 13:54:55 UTC
Ahh, samba4 doesn't bring along its own default smbusers file anymore. I've fixed that in the upstream git repository, an update will follow.

Comment 2 Fedora Update System 2012-12-18 14:36:56 UTC
system-config-samba-1.2.99-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/system-config-samba-1.2.99-1.fc17

Comment 3 Fedora Update System 2012-12-18 14:37:52 UTC
system-config-samba-1.2.99-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/system-config-samba-1.2.99-1.fc16

Comment 4 Fedora Update System 2012-12-18 14:38:03 UTC
system-config-samba-1.2.99-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/system-config-samba-1.2.99-1.fc18

Comment 5 Fedora Update System 2012-12-18 21:25:07 UTC
Package system-config-samba-1.2.99-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing system-config-samba-1.2.99-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-20558/system-config-samba-1.2.99-1.fc18
then log in and leave karma (feedback).

Comment 6 Nils Philippsen 2012-12-19 10:29:46 UTC
*** Bug 871961 has been marked as a duplicate of this bug. ***

Comment 7 FENG Haibo 2012-12-20 13:04:33 UTC
I just updated system-config-samba-1.2.99-1.fc18, verified it solved my problem.
But I meet the new problem when I press OK of "Create New Samba User".
In the terminal it prompts: "sh:/usr/bin/smbpasswd: No such file or directory"
I searched smbpasswd, and found there is a soft link at:
/usr/share/bash-completion/completions/smbpasswd, but this soft link links to smbclient in the same directory.

Would you like to trace this new problem in this ticket? Or would like a new one?

BR

Comment 8 Nils Philippsen 2012-12-21 16:37:06 UTC
(In reply to comment #7)
> Would you like to trace this new problem in this ticket? Or would like a new
> one?

I'd like a new one for that (just copy and paste your comment text, that should be enough). Thanks!

Comment 9 John James 2012-12-22 06:16:07 UTC
Trying to create a samba user for myself

Package: system-config-samba-1.2.97-1.fc17
OS Release: Fedora release 17 (Beefy Miracle)

Comment 10 FENG Haibo 2012-12-22 11:57:16 UTC
New bug created as Bug 889665 .

Comment 11 Fedora Update System 2012-12-28 03:48:10 UTC
system-config-samba-1.2.99-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2012-12-28 03:51:08 UTC
system-config-samba-1.2.99-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2013-01-11 23:34:42 UTC
system-config-samba-1.2.99-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Nils Philippsen 2013-01-14 13:56:50 UTC
*** Bug 892775 has been marked as a duplicate of this bug. ***


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