Project

General

Profile

Bug #5927

Can't change permissions on volumes when Active Directory integration is enabled

Added by Rakaris Baaris about 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
John Hixson
Category:
GUI (new)
Target version:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Hello!
Some time ago I was not able to to configure permissions to Freenas. The problem was not so critical so I have not resolved it. Recently I had upgraded Freenas to v9.2.1.7. Afer that I can't open the permissions tab on storage resources and I'm getting the following error (freenasldap.py in get_netbios_name, line 1031 ):
Request Method:
GET
Request URL:
http://stor-1.lab.local/storage/mountpoint/permission/mnt/var_data/
Software Version:
FreeNAS-9.2.1.7-RELEASE-x86 (fdbe9a0)
Exception Type:
AttributeError
Exception Value:
'NoneType' object has no attribute 'encode'
Exception Location:
/usr/local/www/freenasUI/../freenasUI/common/freenasldap.py in get_netbios_name, line 1031
Server time:
Tue, 26 Aug 2014 18:40:25 +0300
Click to expand...
Also I have noticed that when I enabling Active Directory service, then the logs shows strange warning "STATUS=daemon 'winbindd' finished starting up and ready to serve connectionscheck_domain_online_handler: called for domain LAB (online = False)". See bellow
Aug 26 18:49:14 stor-1 ActiveDirectory: __AD_get_SRV_records: host=_kpasswd._udp.LAB.LOCAL
Aug 26 18:49:14 stor-1 ActiveDirectory: __AD_get_SRV_records: dig -t srv +short +nocomments _kpasswd._udp.LAB.LOCAL
Aug 26 18:49:14 stor-1 ActiveDirectory: __AD_get_SRV_host: trying dc-1.lab.local:464
Aug 26 18:49:14 stor-1 ActiveDirectory: __AD_get_SRV_host: Okay
Aug 26 18:49:14 stor-1 ActiveDirectory: AD_init: kpwdhost = dc-1.lab.local, kpwdport = 464
Aug 26 18:49:14 stor-1 ActiveDirectory: activedirectory_status: checking status
Aug 26 18:49:14 stor-1 ActiveDirectory: AD_status_domain: net -k ads status LAB.LOCAL
Aug 26 18:49:15 stor-1 winbindd49505: STATUS=daemon 'winbindd' finished starting up and ready to serve connectionscheck_domain_online_handler: called for domain LAB (online = False)
Aug 26 18:49:15 stor-1 ActiveDirectory: AD_status_domain: Okay
and Active Directory service button keeps showing status that service configuration is busy (the button stays in normal e.g. switched state when I refresh the browser only). This behavior happens on IE and Google chrome.
Additionally:
net ads info
LDAP server: 172.*.*.*
LDAP server name: DC-1.LAB.local
Realm: LAB.LOCAL
Bind Path: dc=LAB,dc=LOCAL
LDAP port: 389
Server time: Tue, 26 Aug 2014 19:02:02 EEST
KDC server: 172.*.*.*
Server time offset: -1
wbinfo -t
checking the trust secret for domain LAB via RPC calls succeeded
wbinfo -u returns a list of domain users
wbinfo -g returns a list of domain groups
The trace log is included on the attachment.


Related issues

Related to FreeNAS - Bug #5897: Setting Active Directory User PermissionsResolved2014-08-23

Associated revisions

Revision 2c878300 (diff)
Added by John Hixson about 6 years ago

Validate advanced host configurations Ticket: #5927 Ticket: #5897 Ticket: #5753

History

#1 Updated by Jordan Hubbard about 6 years ago

  • Assignee set to John Hixson
  • Target version set to 9.2.1.8-RELEASE

BRB: If there are lots of dups of this, it should be dup'd accordingly and fixed in -stable.

#2 Updated by John Hixson about 6 years ago

  • Status changed from Unscreened to Screened

#3 Updated by John Hixson about 6 years ago

  • Priority changed from Important to Nice to have

#4 Updated by Josh Paetzel about 6 years ago

A few things:
nanobsd/Files/usr/local/libexec/freenas-debug/active_directory/active_directory.sh: needs to chase the database schema changes...for instance it still references ad_adminname which was removed in migration 0099

Active Directory is DISABLED is in the reporters debug log, which seems possibly wrong.

#5 Updated by Josh Paetzel about 6 years ago

  • Related to Bug #5897: Setting Active Directory User Permissions added

#6 Updated by Josh Paetzel about 6 years ago

I chased the schema in the API docs and debug scripts.

#7 Updated by John Hixson about 6 years ago

Can you post a screen shot of your active directory advanced settings?

#8 Updated by John Hixson about 6 years ago

  • Status changed from Screened to Resolved

Fixed in 2c878300d7c1c9ac2ba4085f034b271e50707ea8. Please open up your AD configuration and save it again.

#9 Updated by Rakaris Baaris about 6 years ago

I have made the changes for both files. The changes did not help me. I'm getting the same error

Request Method:
GET

Request URL:
http://stor-1.lab.local/storage/mountpoint/permission/mnt/VMs/

Software Version:
FreeNAS-9.2.1.7-RELEASE-x86 (fdbe9a0)

Exception Type:
AttributeError

Exception Value:
'NoneType' object has no attribute 'encode'

Exception Location:
/usr/local/www/freenasUI/../freenasUI/common/freenasldap.py in get_netbios_name, line 1066

Server time:
Wed, 10 Sep 2014 21:39:47 +0300

Traceback

Environment:

Software Version: FreeNAS-9.2.1.7-RELEASE-x86 (fdbe9a0)
Request Method: GET
Request URL: http://stor-1.lab.local/storage/mountpoint/permission/mnt/VMs/

Traceback:
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
107. response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/usr/local/www/freenasUI/../freenasUI/freeadmin/middleware.py" in process_view
158. return login_required(view_func)(request, view_args, **view_kwargs)
File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in wrapped_view
22. return view_func(request, *args, **kwargs)
File "/usr/local/www/freenasUI/../freenasUI/storage/views.py" in mp_permission
550. 'form': form,
File "/usr/local/lib/python2.7/site-packages/django/shortcuts/
_init__.py" in render
53. return HttpResponse(loader.render_to_string(*args, **kwargs),
File "/usr/local/lib/python2.7/site-packages/django/template/loader.py" in render_to_string
169. return t.render(context_instance)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
140. return self._render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
134. return self.nodelist.render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
840. bit = self.render_node(node, context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render_node
854. return node.render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
123. return compiled_parent._render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in _render
134. return self.nodelist.render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
840. bit = self.render_node(node, context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render_node
854. return node.render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
62. result = block.nodelist.render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
840. bit = self.render_node(node, context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render_node
854. return node.render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
891. output = self.filter_expression.resolve(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in resolve
585. obj = self.var.resolve(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in resolve
735. value = self._resolve_lookup(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in _resolve_lookup
789. current = current()
File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py" in super
72. return mark_safe(self.render(self.context))
File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
62. result = block.nodelist.render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
840. bit = self.render_node(node, context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render_node
854. return node.render(context)
File "/usr/local/www/freenasUI/../freenasUI/freeadmin/templatetags/freeadmin.py" in render
123. help_text,
File "/usr/local/lib/python2.7/site-packages/django/forms/forms.py" in str
425. return self.as_widget()
File "/usr/local/lib/python2.7/site-packages/django/forms/forms.py" in as_widget
475. return widget.render(name, self.value(), attrs=attrs)
File "/usr/local/lib/python2.7/site-packages/django/forms/forms.py" in value
513. return self.field.prepare_value(data)
File "/usr/local/www/freenasUI/../freenasUI/freeadmin/forms.py" in prepare_value
94. user = FreeNAS_User(rv, flags=FLAGS_DBINIT)
File "/usr/local/www/freenasUI/../freenasUI/common/freenasusers.py" in new
376. obj = FreeNAS_ActiveDirectory_User(user, **kwargs)
File "/usr/local/www/freenasUI/../freenasUI/common/freenasldap.py" in init
2275. super(FreeNAS_ActiveDirectory_User, self).
_init__(
*kwargs)
File "/usr/local/www/freenasUI/../freenasUI/common/freenasldap.py" in init
1444. super(FreeNAS_ActiveDirectory, self).__init__(*kwargs)
File "/usr/local/www/freenasUI/../freenasUI/common/freenasldap.py" in init
987. initfunc(
*kwargs)
File "/usr/local/www/freenasUI/../freenasUI/common/freenasldap.py" in db_init
909. self.netbiosname = self.adset(self.netbiosname, self.get_netbios_name())
File "/usr/local/www/freenasUI/../freenasUI/common/freenasldap.py" in get_netbios_name
1066. filter = "(&(objectcategory=crossref)(nCName=%s))" % basedn.encode('utf-8')

Exception Type: AttributeError at /storage/mountpoint/permission/mnt/VMs/
Exception Value: 'NoneType' object has no attribute 'encode'

Request information

#10 Updated by Rakaris Baaris about 6 years ago

I have made the changes for both files. The changes did not help me. I'm getting the same error. Do I need to restart the system after the changes has made?

Request Method:
GET

Request URL:
http://stor-1.lab.local/storage/mountpoint/permission/mnt/VMs/

Software Version:
FreeNAS-9.2.1.7-RELEASE-x86 (fdbe9a0)

Exception Type:
AttributeError

Exception Value:
'NoneType' object has no attribute 'encode'

Exception Location:
/usr/local/www/freenasUI/../freenasUI/common/freenasldap.py in get_netbios_name, line 1066

Server time:
Wed, 10 Sep 2014 21:39:47 +0300

Traceback

Environment:

Software Version: FreeNAS-9.2.1.7-RELEASE-x86 (fdbe9a0)
Request Method: GET
Request URL: http://stor-1.lab.local/storage/mountpoint/permission/mnt/VMs/

Traceback:
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
107. response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/usr/local/www/freenasUI/../freenasUI/freeadmin/middleware.py" in process_view
158. return login_required(view_func)(request, view_args, **view_kwargs)
File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in wrapped_view
22. return view_func(request, *args, **kwargs)
File "/usr/local/www/freenasUI/../freenasUI/storage/views.py" in mp_permission
550. 'form': form,
File "/usr/local/lib/python2.7/site-packages/django/shortcuts/
_init__.py" in render
53. return HttpResponse(loader.render_to_string(*args, **kwargs),
File "/usr/local/lib/python2.7/site-packages/django/template/loader.py" in render_to_string
169. return t.render(context_instance)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
140. return self._render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
134. return self.nodelist.render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
840. bit = self.render_node(node, context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render_node
854. return node.render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
123. return compiled_parent._render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in _render
134. return self.nodelist.render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
840. bit = self.render_node(node, context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render_node
854. return node.render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
62. result = block.nodelist.render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
840. bit = self.render_node(node, context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render_node
854. return node.render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
891. output = self.filter_expression.resolve(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in resolve
585. obj = self.var.resolve(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in resolve
735. value = self._resolve_lookup(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in _resolve_lookup
789. current = current()
File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py" in super
72. return mark_safe(self.render(self.context))
File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
62. result = block.nodelist.render(context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render
840. bit = self.render_node(node, context)
File "/usr/local/lib/python2.7/site-packages/django/template/base.py" in render_node
854. return node.render(context)
File "/usr/local/www/freenasUI/../freenasUI/freeadmin/templatetags/freeadmin.py" in render
123. help_text,
File "/usr/local/lib/python2.7/site-packages/django/forms/forms.py" in str
425. return self.as_widget()
File "/usr/local/lib/python2.7/site-packages/django/forms/forms.py" in as_widget
475. return widget.render(name, self.value(), attrs=attrs)
File "/usr/local/lib/python2.7/site-packages/django/forms/forms.py" in value
513. return self.field.prepare_value(data)
File "/usr/local/www/freenasUI/../freenasUI/freeadmin/forms.py" in prepare_value
94. user = FreeNAS_User(rv, flags=FLAGS_DBINIT)
File "/usr/local/www/freenasUI/../freenasUI/common/freenasusers.py" in new
376. obj = FreeNAS_ActiveDirectory_User(user, **kwargs)
File "/usr/local/www/freenasUI/../freenasUI/common/freenasldap.py" in init
2275. super(FreeNAS_ActiveDirectory_User, self).
_init__(
*kwargs)
File "/usr/local/www/freenasUI/../freenasUI/common/freenasldap.py" in init
1444. super(FreeNAS_ActiveDirectory, self).__init__(*kwargs)
File "/usr/local/www/freenasUI/../freenasUI/common/freenasldap.py" in init
987. initfunc(
*kwargs)
File "/usr/local/www/freenasUI/../freenasUI/common/freenasldap.py" in db_init
909. self.netbiosname = self.adset(self.netbiosname, self.get_netbios_name())
File "/usr/local/www/freenasUI/../freenasUI/common/freenasldap.py" in get_netbios_name
1066. filter = "(&(objectcategory=crossref)(nCName=%s))" % basedn.encode('utf-8')

Exception Type: AttributeError at /storage/mountpoint/permission/mnt/VMs/
Exception Value: 'NoneType' object has no attribute 'encode'

Request information

#11 Updated by Josh Paetzel about 6 years ago

Yes, you'll need to restart the system.

#12 Updated by Rakaris Baaris about 6 years ago

Just rebooted, I got the same error.

#13 Updated by Rakaris Baaris about 6 years ago

Hello!
As I the problem is not resolved for me, do I need to create new ticket as this bug status is set to Resolved?
Thanks!

#14 Updated by Rakaris Baaris about 6 years ago

Rakaris Baaris wrote:

Hello!
As the problem is not resolved for me, do I need to create new ticket as this bug status is set to Resolved?
Thanks!

#15 Updated by Dru Lavigne almost 3 years ago

  • File deleted (debug-stor-1-20140826192432.tar)

Also available in: Atom PDF