1 (edited by dsteinkopf 2015-09-29 20:03:34)

Topic: Add LDAP password columns for Samba

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: Ubuntu 14.04.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue: -
====

Hello,

as we are using the iRedMail-LDAP-Server as our central user repository we want to make our NAS (Samba) use the iRedMail LDAP Server, too. We found out, Samba needs the following additional password related columns: sambaPwdLastSet, SambaNTPassword, SambaLMPassword. Unfortunately these are currently missing.

So we developed a small patch to iRedAdmin (user.py.patch - see attachment) which sets/changes these columns whenever a password is changed. Now our NAS is able to use the LDAP server as user database.

Any comments on this? Are there any chances, this will be integrated in one of the next iRedMail releases?

Thank you,

Dirk

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Add LDAP password columns for Samba

Dear Dirk,

Thanks for the feedback, but you forgot to attach your patch. smile
I will review your patch and merge it (maybe modify a little bit), i believe more customers will benefit from this.

3 (edited by dsteinkopf 2015-09-29 22:11:46)

Re: Add LDAP password columns for Samba

Sorry, now it is attached.

Post's attachments

user.py.patch 2.55 kb, 2 downloads since 2015-09-29 

You don't have the permssions to download the attachments of this post.

4

Re: Add LDAP password columns for Samba

Dear Dirk,

I reviewed your patch, it hard-codes too many non-general purpose code (not everyone needs to update these ldap attributes), i suggest you implement it with iRedAdmin-Pro hook instead. Please check files under 'docs/hooks/' in the latest iRedAdmin-Pro to understand how to write a hook.

According to your patch, you should do it in hook 'hook_before_creating_user'.

BTW, i updated libs/ldaplib/user.py to add 'plain_password' instead of 'plainpasswd' (line 340-342) in your patch, i suggest you change it too, so that you don't need to update your hook file after upgrading iRedAdmin-Pro.