On 17/03/14 15:19, Diego Woitasen wrote:> Hi,
> I've found in the list how to add new indexes to Samba4. I read the
> you have to modify the searchFlags attr in the schema. I've tried but
> fails.
>
> # ldapmodify -f uid.ldif
> SASL/GSSAPI authentication started
> SASL username: administrator at mydomain.local
> SASL SSF: 56
> SASL data security layer installed.
> modifying entry
"CN=uid,CN=Schema,CN=Configuration,DC=mydomain,DC=local"
> ldap_modify: Server is unwilling to perform (53)
> additional info: 00002035: schema_data_modify: updates are not
> allowed: reject request
>
> The uid.ldif contains:
>
> dn: CN=uid,CN=Schema,CN=Configuration,DC=samba4,DC=mydomain,DC=local
> changetype: modify
> replace: searchFlags
> searchFlags: 13
>
> Is that OK. I also tried with ldbmodify and got the same error.
>
> I really need to index more attributes, I have more than 5k users and
> the performance of some queries are slow.
>
> Regards,
> Diego
>
>
Hi, as a rule you cannot update the schema, you need to do it something
like this:
Stop samba 4
Run this command: ldbmodify -H path_to_sam_ldb uid.ldif
--option="dsdb:schema update allowed"=true
Replacing 'path_to_sam_ldb' with the path to sam.ldb, if you compiled it
yourself, this could be '/usr/local/samba/private/sam.ldb', if you are
using some form of debian package, it could be
'/var/lib/samba/private/sam.ldb'.
restart samba 4
Rowland