[Samba] Samba 4 samba-tool user add fails

Andrew Bartlett abartlet at samba.org
Sat Feb 18 02:31:11 MST 2012

On Fri, 2012-02-10 at 19:37 +0100, steve wrote:
> samba-tool user add nfs-u
> New Password:
> ERROR(ldb): Failed to add user 'nfs-u':  - operations error at 
> ../source4/dsdb/samdb/ldb_modules/password_hash.c:2163
> Anyone?
> Thanks,
> Steve


The best way to sort out an error like this, where you have the good
fortune to have the exact failing line of the source code, is to open
that file, and look at that happens on that line.

In this case, it is:

	if (smb_krb5_init_context(ac,
				  (struct loadparm_context *)ldb_get_opaque(ldb, "loadparm"),
				  &io->smb_krb5_context) != 0) {
		return ldb_operr(ldb);

It appears that we could not initialise our krb5 context.  Have you set
something strange in your krb5.conf that might be causing Heimdal

The next step is to turn up the debug level -d5 should do it, but you
can go up to -d10 for more detail.  Then see if there are more clues.

A number of the things you are trying to do with Samba4 are still fairly
novel, and so you may be hitting new ground from time to time.  Rest
assured that I will keep trying to assist where I can, but you can also
help by chasing down some of the debugging steps yourself.


Andrew Bartlett

Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org

More information about the samba mailing list