On 10/03/2014 02:54 AM, Harry Jede wrote:> Hi all,
>
> if one by accident points the ldbsearch command to any file, which is
> not a ldb file, this file is silently converted to a tdb file ;-) .
>
>
> root at dc0:~# file /tmp/t2.ldif
> /tmp/t2.ldif: ASCII text
>
> root at dc0:~# ldbsearch -H /tmp/t2.ldif
> # returned 0 records
> # 0 entries
> # 0 referrals
>
> root at dc0:~# file /tmp/t2.ldif
> /tmp/t2.ldif: TDB database version 6, little-endian hash size 10000
> bytes
>
>
> This behaviour my be OK for ldbadd/ldbmodify. But for a search command?
>
> Samba version is:
> Version 4.1.11-Debian
>
-H option indicates the path to an LDB file, if not existing the LDB
tools will create it.
We could improve the situation not to create the file if missing, I'll
defer it to Simo.
Matthieu.
--
Matthieu Patou
Samba Team
http://samba.org