In 3.6 and 4.0 we miss a tool to migrate printing tdb's which are in latin1. The patchset extends the 'net printing' commands with an 'encoding=' option to define a codepage to convert from.
Created attachment 8649 [details] v4-0-test patch
Created attachment 8650 [details] v3-6-test patch
Text for WHATSNEW.txt: It is still the case that there are printing tdbs (ntpringint.tdb, ntforms.tdb, ntdrivers.tdb) which are in latin1 or other encodings. When updating from Samba 3.5 or earlier to Samba 3.6 or 4.0 these tdbs need to be migrated to our new registry based printing management. This means during the migration we also need to do charset conversion. This can only been done manually cause we don't know in which encoding the tdb is. You have to specify the correct code page for the conversion, see iconv -l and Wikipedia [1] for the available codepages. The mostly used one is Windows Latin1 which is CP1252. We've extended the 'net printing dump' and 'net printing migrate' commands to define the encoding of the tdb. So you can correctly view the tdb with: net printing dump encoding=CP1252 /path/to/ntprinters.tdb or migrate it with e.g.: net printing migrate encoding=CP1252 /path/to/ntprinters.tdb If you migrate printers we suggest you do it in the following order. ntforms.tdb ntdrivers.tdb ntprinting.tdb Don't forget to rename, move or delete these files in /var/lib/samba after the migration. [1] https://en.wikipedia.org/wiki/Code_page
Karolin, please add to v3-6-test and v4-0-test test. Could you do me a favor and run: make test TESTS="local.ndr" in the 3.6 branch. Just to be sure it works on a different machine too.
Pushed to autobuild-v4-0-test.
Pushed to v3-6-test after running 'make test'.
Pushed to v4-0-test. Leaving bug report open to add the section for the release notes.
Closing out bug report. Thanks!
I think we should also write in the text, which encoding is being used now, I guess some Unicode charset? UTF-8? UTF-16? Also the text should contain some information what determined the charset that was previously used. Andreas, can you tell somthing about this points?
> I think we should also write in the text, which encoding is being used now, I > guess some Unicode charset? UTF-8? UTF-16? man smb.conf -> unix charset > Also the text should contain some information what determined the charset that > was previously used. Nothing. We expect that the tdb's are in UTF-8.
Björn, what do you want documented where?
let's leave it like this, i don't know how ot improve it becuase i don't really understand how exactly the tdb encoding was handled in the past with which versions of samba. in any case with the dump and migrate options people should be able to figure out what to do somehow.