Active Directory Extras Plugin - Allows Tweaking some AD Settings in Samba


Recommended Posts

This is a plugin that adds a page to SMB Settings so we can experiment with some Active Directory settings.  There are settings to adjust the backend database and some cache settings.  The plugin adds a tab 'Active Directory Extras' to the SMB Settings to permit making several AD changes.  The changes are saved and re-applied when the server is started so they don't have to be re-applied.

 

What I am hoping to accomplish is to give users a tool where thay can make some Samba adjustments to try to get the AD feature more robust and reliable.  I've done some research and have found several SMB settings that might help.  In particular the 'idmap cache time' and 'winbind cache time'.  I think these might address the issues with losing share access over time.

 

I do not have a Windows Server, so I can't do any testing.  I have to get all my information from the Unraid Forum.  I have very limited expereience with AD, so I'll need some users to test and help troubleshoot.

 

This plugin will be treated as Beta for the time being and will have to be manually installed.  Being Beta, you understand that there are risks associated with the plugin.

 

The final outcome of these efforts will determine if anything needs to be adjusted in Unraid.  It may be that this turns into a plugin published on CA, or some of these settings may be part of the Active Directory Settings page.

 

The Active Directory Extras plugin is available on CA.

 

Manually install the plugin by going to the Plugins tab and enter the following line to install the plugin:

https://raw.githubusercontent.com/dlandon/active.directory/master/active.directory.plg

 

I would suggest you apply the default settings and let's start there.  Be aware that if you change the backend database, you'll lose all your settings and will have to re-enter them.

 

The plugin default for "idmap cache time" is 3.5 days.  The Samba default is 7 days.

 

The plugin default for "winbind cache time" is 15 seconds.  The Samba default is 5 minutes.

  • Like 5
Link to comment

Thanks Dan, 

 

I can confirm that I was able to install the plugin on 6.11.5. (Plugin version: released about 30 minutes ago, i think that was the second version)  My test environment is running with a hash backend and plan to change that when I have a plan to address some other challenges. 

 

I haven't run into the "timeout" issues that some others have but I tested the plugin changing my lab backend from hash to tbd. Using testparm i am able to confirm the [global] configuration has changed from: 

 

        idmap config * : range = 10000-4000000000
        idmap config * : backend = hash

 

to 

        idmap config * : range = 3000-7999
        idmap config * : backend = tdb

 

Some thoughts: 

  • Could the script be made to run on 6.9.2 too? (I will be addressing the idmap config in 6.9.2 before I move over to 6.10.3+ and have fixed my private share issues). 
  • Would there be a way to increase the logging level in samba? (pre-empting troubleshooting on my private share issue)

Thanks for all of your time creating this plugin. 

 

Before.png

After.png

Edited by unraidster
Link to comment

The values on the right side are the current settings read from testparm.

 

18 minutes ago, unraidster said:

Could the script be made to run on 6.9.2 too? (I will be addressing the idmap config in 6.9.2 before I move over to 6.10.3+ and have fixed my private share issues). 

I'll set the min version to 6.9.0 on the next release.

 

19 minutes ago, unraidster said:

Would there be a way to increase the logging level in samba? (pre-empting troubleshooting on my private share issue)

What level of debugging would you want?

Link to comment
  • 3 weeks later...
  • 2 months later...

Good morning,

I would like to ask a question, I have unraid as a file server, and an active directory (SAMBA) for user and policy management, will your application work as a user access synchronizer? for example when creating, editing or removing in AD, will unraid synchronize and update the user?

Link to comment
  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.