Hello and thanks for your time. Changing password as suggested (kadmin -l cpw ...) works even if I've realised that at my first attempt kpasswdd was still down (since yesterday) and I wasn't notified about any failure straight away (only the daemon logs on authlog...when is up), it just completed the command with no output; obviously didn't change the password. After starting back the daemon it worked well.
I'm using the HDB3 which I believe is part of the package itself (if I properly understood your question). This is the output of the procedure on the newly re-compiled heimdal with the CFLAGS="-g -ggdb3 -O0" but doesn't look much different from the previous non-debugging version to me (hopefully I didn't make any mistake). A snippet of the compilation at the very end of this email. (gdb) bt #0 0x00000ae0709ed5d6 in change () from /usr/local/heimdal/lib/libkadm5srv.so.3.0 #1 0x00000ae0709ed55f in kadm5_s_chpass_principal_cond () from /usr/local/heimdal/lib/libkadm5srv.so.3.0 #2 0x00000ade6d002bfb in ?? () from /usr/local/heimdal/libexec/kpasswdd #3 0x00000ade6d001b89 in ?? () from /usr/local/heimdal/libexec/kpasswdd #4 0x00000ade6d0017d9 in ?? () from /usr/local/heimdal/libexec/kpasswdd #5 0x00000ade6d001073 in ?? () from /usr/local/heimdal/libexec/kpasswdd #6 0x00000ade6d0009a6 in ?? () from /usr/local/heimdal/libexec/kpasswdd #7 0x0000000000000000 in ?? () (gdb) x/i $pc 0xae0709ed5d6 <change+102>: cmpl $0x0,0xc8(%r14) (gdb) i reg rax 0x76118487c2646c07 8507726889696390151 rbx 0x1 1 rcx 0x0 0 rdx 0x1 1 rsi 0xae13fbbe1a0 11962553196960 rdi 0x0 0 rbp 0x7f7ffffd58b0 0x7f7ffffd58b0 rsp 0x7f7ffffd57a0 0x7f7ffffd57a0 r8 0x0 0 r9 0xae13fbbe4e0 11962553197792 r10 0xae0a1066ab0 11959890504368 r11 0xae0a299e000 11959916945408 r12 0xae13fbbe1a0 11962553196960 r13 0x0 0 r14 0x0 0 r15 0xae13fbbe4e0 11962553197792 rip 0xae0709ed5d6 0xae0709ed5d6 <change+102> eflags 0x10206 66054 cs 0x2b 43 ss 0x23 35 ds 0x23 35 es 0x23 35 fs 0x23 35 gs 0x23 35 ........ /usr/bin/libtool --tag=CC --mode=link cc -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs -Wshadow -Wno-extra -Wno-missing-field-initializers -Wno-strict-aliasing -Wno-shadow -DINET6 -g -ggdb3 -O0 -pthread -L/usr/local/lib -o nt_gss_server nt_gss_server.o nt_gss_common.o ../../lib/gssapi/libgssapi.la ../../lib/krb5/libkrb5.la ../../lib/hcrypto/libhcrypto.la ../../lib/asn1/libasn1.la ../../lib/vers/libvers.la ../../lib/roken/libroken.la -pthread libtool: link: cc -o .libs/nt_gss_server -pthread -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs -Wshadow -Wno-extra -Wno-missing-field-initializers -Wno-strict-aliasing -Wno-shadow -DINET6 -g -ggdb3 -O0 nt_gss_server.o nt_gss_common.o /usr/ports/pobj/heimdal-7.5.0/heimdal-7.5.0/lib/vers/.libs/libvers.a -L.libs -lgssapi -lheimntlm -lkrb5 -lasn1 -lcom_err -lroken -lutil -lwind -lheimbase -lhx509 -lhcrypto -lcrypto -lheimsqlite -Wl,-rpath,/usr/local/heimdal/lib .libs/libcom_err.so.21.0: warning: strcat() is almost always misused, please use strlcat() .libs/libhcrypto.so.0.0: warning: rand() may return deterministic values, is that what you want? cc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -I../../lib/roken -I../../lib/roken -I/usr/local/include -D_LARGE_FILES= -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs -Wshadow -Wno-extra -Wno-missing-field-initializers -Wno-strict-aliasing -Wno-shadow -DINET6 -g -ggdb3 -O0 -pthread -MT nt_gss_client.o -MD -MP -MF .deps/nt_gss_client.Tpo -c -o nt_gss_client.o nt_gss_client.c mv -f .deps/nt_gss_client.Tpo .deps/nt_gss_client.Po /usr/bin/libtool --tag=CC --mode=link cc -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs -Wshadow -Wno-extra -Wno-missing-field-initializers -Wno-strict-aliasing -Wno-shadow -DINET6 -g -ggdb3 -O0 -pthread -L/usr/local/lib -o nt_gss_client nt_gss_client.o nt_gss_common.o common.o ../../lib/gssapi/libgssapi.la ../../lib/krb5/libkrb5.la ../../lib/hcrypto/libhcrypto.la ../../lib/asn1/libasn1.la ../../lib/vers/libvers.la ../../lib/roken/libroken.la -pthread libtool: link: cc -o .libs/nt_gss_client -pthread -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs -Wshadow -Wno-extra -Wno-missing-field-initializers -Wno-strict-aliasing -Wno-shadow -DINET6 -g -ggdb3 -O0 nt_gss_client.o nt_gss_common.o common.o /usr/ports/pobj/heimdal-7.5.0/heimdal-7.5.0/lib/vers/.libs/libvers.a -L.libs -lgssapi -lheimntlm -lkrb5 -lasn1 -lcom_err -lroken -lutil -lwind -lheimbase -lhx509 -lhcrypto -lcrypto -lheimsqlite -Wl,-rpath,/usr/local/heimdal/lib ........ On Thu, 2018-08-02 at 12:44 -0400, Viktor Dukhovni wrote: > > On Aug 2, 2018, at 12:33 PM, ASV <a...@inhio.net> wrote: > > > > Program received signal SIGSEGV, Segmentation fault. > > 0x00001db26a5615d6 in change () from > > /usr/local/heimdal/lib/libkadm5srv.so.3.0 > > Current language: auto; currently minimal > > (gdb) The program is running. Exit anyway? (y or n) n > > Not confirmed. > > (gdb) backtrace > > #0 0x00001db26a5615d6 in change () from > > /usr/local/heimdal/lib/libkadm5srv.so.3.0 > > #1 0x00001db26a56155f in kadm5_s_chpass_principal_cond () from > > /usr/local/heimdal/lib/libkadm5srv.so.3.0 > > #2 0x00001dafc3001b90 in ?? () from > > /usr/local/heimdal/libexec/kpasswdd > > #3 0x00001dafc3000996 in ?? () from > > /usr/local/heimdal/libexec/kpasswdd > > #4 0x0000000000000000 in ?? () > > > > Any help would be highly appreciated. > > Thanks in advance. > > 1. Please rebuild heimdal with debugging symbols: > > CFLAGS="-g -ggdb3 -O0" > > that should make possible a stack trace with line numbers, ... > > 2. What happens when you try to change the password as root via > "kadmin -l cpw ..."? Does that work? > > 3. It might be helpful to know what HDB backend you're using. > > 4. Even without symbols you can ask GDB for the faulting > instruction: > > x/i $pc > > and print the register values: > > i reg > > This may help to understand whether this a NULL pointer dereference, > or something else. >