Importing an smbpasswd file to tdbsam. smbpasswd file is many years old and has gone through many samba versions. It works with samba. pdbedit -i reported the following valid error "build_sam_account: smbpasswd database is corrupt! username LYDON170$ with uid 2046 is not in unix passwd database!". The problem is that pdbedit does not process smbpasswd entries beyond the one in error. My opinion is that pdbedit should continue importing entries beyond the one in error because samba recognized these entries.
As Samba3 requires corresponding Unix accounts, I think it is perfectly fine to stop importing when the Unix account is missing. Then you can choose whether you either create the account or cleanup the smbpasswd file. Otherwise, you would create a corrupt database.
Marking bug report as invalid.
Please feel free to re-open if you like to discuss this further.
I agree that the entry in the smbpasswd file without a valid Unix account should not be imported. However, especially because Samba 3 operates correctly with entries further down in the smbpasswd file, I feel the pdbedit should continue scanning and importing valid entries further down in the smbpasswd file.
True. We should continue with accounts further down.
Created attachment 6124 [details]
This just changes the DEBUG 0 message to a warning for the end user and returns true, because the caller might need to continue.
It fixes this bug for me and also bso#7838.
But I have no oversight in possible side effects. Volker can you please check?
on comment#2. The proposal does import an account without a valid unix account, at least it puts out a warning and doesn't terminate. I think about a better patch that differs between 'invalid account' and 'account without a unix account'.
Comment on attachment 6124 [details]
Sorry, this is the wrong level to fix this. Changing behaviour so deep inside pdb_getsampwxxx is way too scary for me. I haven't looked at pdbedit, but such patch must change things at a higher level.
I agree Volker, I am working on a more high level solution.