Fix UTF-8 encoding for Auxiliary Parameters
Sadly the generation of the sssd.conf is broken again.
If any value in "Auxiliary Parameters:" is given when defining an LDAP connection it fails with:
Traceback (most recent call last): File "/usr/local/libexec/nas/generate_sssd_conf.py", line 907, in <module> main() File "/usr/local/libexec/nas/generate_sssd_conf.py", line 901, in main add_ldap_section(client, sc) File "/usr/local/libexec/nas/generate_sssd_conf.py", line 731, in add_ldap_section f.write(ldap.ldap_auxiliary_parameters) TypeError: a bytes-like object is required, not 'str'
If there is no value it succeeds and the config is where it should be in: /usr/local/etc/sssd/sssd.conf
(Maybe this is an duplicate, I did a quick search and didn't find anything so I thought I'll go ahead and post)
#10 Updated by Joe Maloney over 3 years ago
- Status changed from 47 to Ready For Release
- Needs QA changed from Yes to No
- QA Status Test Passes added
- QA Status deleted (
Added the following to auxiliary parameters in Directory Services/LDAP:
dos charset = cp866 unix charset = UTF8 display charset = UTF8
Verified that smb4.conf was generated with the auxiliary parameters in global after ldap started:
root@bonniemini:/usr/local/etc # more smb4.conf [global] server max protocol = SMB3 encrypt passwords = yes dns proxy = no strict locking = no oplocks = yes deadtime = 15 max log size = 51200 max open files = 941834 logging = file load printers = no printing = bsd printcap name = /dev/null disable spoolss = yes getwd cache = yes guest account = nobody map to guest = Bad User obey pam restrictions = yes ntlm auth = no directory name cache size = 0 kernel change notify = no panic action = /usr/local/libexec/samba/samba-backtrace nsupdate command = /usr/local/bin/samba-nsupdate -g server string = FreeNAS Server ea support = yes store dos attributes = yes lm announce = yes hostname lookups = yes acl allow execute always = true dos filemode = yes multicast dns register = yes domain logons = no local master = no idmap config *: backend = tdb idmap config *: range = 90000001-100000000 server role = standalone netbios name = BONNIEMINI workgroup = WORKGROUP security = user pid directory = /var/run/samba create mask = 0666 directory mask = 0777 client ntlmv2 auth = yes dos charset = CP437 unix charset = UTF-8 log level = 10