Re: Samba4: no way? (776 Views)
Reply
Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 1 of 31 (812 Views)
Accepted Solution

Samba4: no way?

[ Edited ]

i compile fine samba 4.0.5 and 4.1.5

on hpux 11v3

But when i try to join a domain give this error

 

 

ads_krb5_mk_req: krb5_cc_get_principal failed (No such file or directory)

 Anyone got success on samba4 in hpux?

Thanks

 

 

P.S. This thread has been moved from General to HP-UX > languages. - Hp Forum Moderator

Honored Contributor
Posts: 981
Registered: ‎03-01-2005
Message 2 of 31 (798 Views)

Re: Samba4: no way?

What kerberos client version are you using?.

 

Take a look at:

 

http://h30499.www3.hp.com/t5/System-Administration/Samba-kinit-OK-but-quot-net-ads-join-quot-fails-C...

Windows?, no thanks
Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 3 of 31 (784 Views)

Re: Samba4: no way?

Thanks,now another problem wont compile

 

./configure[13]: 8212 Errore del bus(coredump)
 gdb configure core
HP gdb 6.3 for HP Itanium (32 or 64 bit) and target HP-UX 11iv2 and 11iv3.
Copyright 1986 - 2011 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 6.3 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
.."/usr/local/src/samba-4.1.6/configure": not in executable format: File format not recognized


warning: Unknown symbols for 'core'; use the 'symbol-file' command.
Core was generated by `python2.7'.
Program terminated with signal 10, Bus error.
BUS_ADRALN - Invalid address alignment. Please refer to the following link that helps in handling unaligned data: http://docs.hp.com/en/7730/newhelp0610/pragmas.htm#pragma-pack-ex3
#0  0x60000000c3073811 in <unknown_procedure> ()

 

Acclaimed Contributor
Posts: 25,527
Registered: ‎03-06-2006
Message 4 of 31 (776 Views)

Re: Samba4: no way?

>gdb configure core

>Core was generated by 'python2.7'.

 

You need to find where python2.7 was installed and add that on the gdb command line:

gdb .../python2.7 core

 

>BUS_ADRALN - Invalid address alignment. Please refer to the following link that helps in handling unaligned data

 

This indicates an alignment trap.  All data must be on their natural alignment.

Unless steps taken on that URL are used.

 

Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 5 of 31 (771 Views)

Re: Samba4: no way?

Is possible to solve?

 

Acclaimed Contributor
Posts: 25,527
Registered: ‎03-06-2006
Message 6 of 31 (767 Views)

Re: Samba4: no way?

>Is possible to solve?

 

Well, do you really want to debug python problems?  If you want to pursue this, you need to invoke gdb correctly and get a better stack trace.

You may want to try another version?

Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 7 of 31 (394 Views)

Re: Samba4: no way?

Solution found for python: now two problems

If i use samba4 compiled with hpux krb5-client official give me this error

 

 

Failed to join domain: failed to connect to AD: Cannot contact any KDC for requested realm

 

So i try to compile samba3 or 4 with mit kerberos

 

Samba4 give this error

 

 

Waf: Entering directory `/usr/local/src/samba-4.0.23/bin'
    Selected system MIT krb5 libraries, Heimdal use is disabled
[   8/2596] Generating VERSION
[ 531/2596] Compiling source4/dsdb/samdb/cracknames.c
In file included from ../source4/auth/kerberos/kerberos.h:29,
                 from ../source4/dsdb/samdb/cracknames.c:30:
../lib/krb5_wrap/krb5_samba.h:64:1: warning: "AP_OPTS_USE_SUBKEY" redefined
In file included from /opt/krb5/include/krb5.h:8,
                 from ../lib/replace/system/kerberos.h:33,
                 from ../source4/auth/kerberos/kerberos.h:26,
                 from ../source4/dsdb/samdb/cracknames.c:30:
/opt/krb5/include/krb5/krb5.h:1657:1: warning: this is the location of the previous definition
In file included from ../source4/auth/kerberos/kerberos.h:29,
                 from ../source4/dsdb/samdb/cracknames.c:30:
../lib/krb5_wrap/krb5_samba.h:73:2: error: #error UNKNOWN_KRB5_ADDRESS_TYPE
Waf: Leaving directory `/usr/local/src/samba-4.0.23/bin'
Build failed:  -> task failed (err #1):
        {task: cc cracknames.c -> cracknames_1.o}
Makefile:8: recipe for target 'all' failed
gmake: *** [all] Error 1

 

and samba3 this other

 

"checking configure summary... configure: error: summary failure. Aborting config"

 I use for all this line

 

 

 ./configure --prefix=/opt/samba3 --with-lockdir=/var/opt/samba3/locks --with-privatedir=/var/opt/samba3/private --sysconfdir=/etc/opt/samba3 --localstatedir=/var/opt/samba3 --with-krb5=/opt/krb5 

 

Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 8 of 31 (381 Views)

Re: Samba4: no way?

Solution found at least for samba3

a)Compile by yourself latest mit-krb5(i have installed it in /opt/krb5

b)configure samba(samba4 give error,samba3 is better)

use gcc from gnu and make from gnu

 

 

 ./configure --prefix=/opt/samba3 --with-lockdir=/var/opt/samba3/locks --with-privatedir=/var/opt/samba3/private --sysconfdir=/etc/opt/samba3 --localstatedir=/var/opt/samba3 --with-krb5=/opt/krb5  CPPFLAGS='-I/opt/krb5/include' LDFLAGS=' -L/opt/krb5/lib -Wl,+b,/opt/krb5/lib -lkrb5 -lk5crypto -lcom_err'

 

c)Install samba3 and configure as usual for AD

you have to edit krb5.conf and smb.conf like this

 

 

[libdefaults]
 default_realm = DOMINIO.COM
 dns_lookup_realm = true
 dns_lookup_kdc = true
 ticket_lifetime = 24h
 renew_lifetime = 7d
 forwardable = true
 allow_weak_crypto = true
 default_tgs_enctypes = rc4-hmac des-cbc-crc des-cbc-md5
 default_tkt_enctypes = rc4-hmac des-cbc-crc des-cbc-md5
 permitted_enctypes = rc4-hmac des-cbc-crc des-cbc-md5

[realms]
 =DOMINIO.COM {
 }

[domain_realm]
 .dominio.com =  DOMINIO.COM
 dominio.com = DOMINIO.COM

 

 

 

Then run smbd nmbd winbindd and join ad with net ads join,works fine.

Thanks all for help

 

 

 

 

Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 9 of 31 (371 Views)

Re: Samba4: no way?

I need a last little help.

How to "show" to hpux my nss library?

I use

ln -s /opt/samba3/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1

 but pwget and id don't show winbind users

Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 10 of 31 (369 Views)

Re: Samba4: no way?

I make correct link but i have some problems

/usr/lib/hpux32/dld.so: Unsatisfied code symbol '_nss_winbind_initgroups_dyn' in load module '/usr/lib/hpux32/libnss_winbind.so.1'.
Killed

 

Acclaimed Contributor
Posts: 25,527
Registered: ‎03-06-2006
Message 11 of 31 (350 Views)

Re: Samba4: no way? Unsatisfied code symbol _nss_winbind_initgroups_dyn

Well, where is this symbol _nss_winbind_initgroups_dyn defined?

Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 12 of 31 (335 Views)

Re: Samba4: no way? Unsatisfied code symbol _nss_winbind_initgroups_dyn

Honestly i don't know.

Probably missing libraries?

 

Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 13 of 31 (330 Views)

Re: Samba4: no way? Unsatisfied code symbol _nss_winbind_initgroups_dyn

I have recompile,still error,i see this call in

 

nsswitch/winbind_nss_solaris.h:NSS_STATUS _nss_winbind_initgroups_dyn(char *user, gid_t group, long int *start,
nsswitch/winbind_nss_netbsd.c:NSS_STATUS _nss_winbind_initgroups_dyn(char *user, gid_t group, long int *start,
nsswitch/winbind_nss_solaris.c:    _nss_winbind_initgroups_dyn(gmem->username,
nsswitch/winbind_nss_linux.c:NSS_STATUS _nss_winbind_initgroups_dyn(char *user, gid_t group, long int *start,
nsswitch/winbind_nss_linux.c:_nss_winbind_initgroups_dyn(char *user, gid_t group, long int *start,

 

Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 14 of 31 (326 Views)

Re: Samba4: no way?

Using nm i see

 

nm -n /usr/lib/hpux32/libnss_winbind.so.1.old|grep _nss_winbind_initgroups_dyn
[142]    |     67178688|    2080|FUNC |GLOB |0|   .text|_nss_winbind_initgroups_dyn
nm -n /usr/lib/hpux32/libnss_winbind.so.1|grep _nss_winbind_initgroups_dyn
[185]    |            0|       0|FUNC |GLOB |0|   UNDEF|_nss_winbind_initgroups_dyn

 

Acclaimed Contributor
Posts: 25,527
Registered: ‎03-06-2006
Message 15 of 31 (307 Views)

Re: Samba4: no way?

This shlib has a definition:

/usr/lib/hpux32/libnss_winbind.so.1.old

[142] | 67178688| 2080|FUNC |GLOB |0| .text|_nss_winbind_initgroups_dyn

 

If there are pairs of shlibs, did they move _nss_winbind_initgroups_dyn to another shlib?

Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 16 of 31 (299 Views)

Re: Samba4: no way?

[ Edited ]

Mmmm.. i don't know.

How to check?

I did nm on both modules(old and new)

nm -n libnss_winbind.so.1*|grep _nss_winbind_initgroups_dyn

[185]    |            0|       0|FUNC |GLOB |0|   UNDEF|_nss_winbind_initgroups_dyn
[142]    |     67178688|    2080|FUNC |GLOB |0|   .text|_nss_winbind_initgroups_dyn

 

 

I use this configure,and for install modules,simply copy them and linked in hpux32

 

 

./configure --prefix=/opt/samba3 --with-lockdir=/var/opt/samba3/locks --with-privatedir=/var/opt/samba3/private --with-configdir=/etc/opt/samba3 --localstatedir=/var/opt/samba3 --with-krb5=/opt/krb5 --enable-nss-wrapper --enable-socket-wrapper --enable-static --enable-pthreadpool --with-libaddns --with-automount --with-quotas  --with-aio-support  --with-libiconv==/usr/local \
--with-pam \
--with-winbind \
--with-readline \
--with-lockdir=/var/opt/samba3/locks \
--with-statedir=/var/opt/samba3/locks \
--with-cachedir=/var/opt/samba3/cache \
--with-piddir=/var/opt/samba3/locks \
--with-logfilebase=/var/opt/samba3/log \
ac_cv_lib_rt_fdatasync=no \
ac_cv_have_fdatasync_decl=no \
ac_cv_lib_ext_rt_fdatasync=no \
CPPFLAGS='-I/opt/krb5/include' LDFLAGS='-L/opt/krb5/lib -Wl,+b,/opt/krb5/lib -lkrb5 -lk5crypto -lcom_err'

 

I forgot: i use gcc gnu for compile(aCC HP and free CC hp fail both)

and hpux standard make for make(i used also gmake,nothing change)

Thanks for help

Acclaimed Contributor
Posts: 25,527
Registered: ‎03-06-2006
Message 17 of 31 (276 Views)

Re: Samba4: no way?

Is there conditional compilation that causes _nss_winbind_initgroups_dyn to not be defined in nsswitch/winbind_nss_linux.c?

Your search above shows it's on two lines.

Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 18 of 31 (267 Views)

Re: Samba4: no way?

I don't know,

i try to recompile with different options.

 

Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 19 of 31 (261 Views)

Re: Samba4: no way?

Nothing to do

 

nm -n libnss_winbind.so*|grep _nss_winbind_initgroups_dyn
[185]    |            0|       0|FUNC |GLOB |0|   UNDEF|_nss_winbind_initgroups_dyn

 

Acclaimed Contributor
Posts: 25,527
Registered: ‎03-06-2006
Message 20 of 31 (246 Views)

Re: Samba4: no way?

>I try to recompile with different options.

 

Look at the source around those two declarations.   Also look around the call sites.

Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 21 of 31 (238 Views)

Re: Samba4: no way?

I check the .sl file of samba4(is called with another name but is the same as  libwinbind_nss.so)

and there is no problem with unresolved symbols,the problem is samba4 won't compile with krb5

and if compiled with internal heimdal cannot join the samba4 dc server.

 

Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 22 of 31 (221 Views)

Re: Samba4: no way?

[ Edited ]

"_nss_winbind_initgroups_dyn"

 

 

Is possible to remove this call?

Is on linux and solaris header and .c files,but not on hpux header.

I don't understand why is ok on samba4 but not on samba3

is also defined on hp cifs server(wich doesn't work with samba4 ad)

 

grep nss_winbind_initgroups * -ir
Il file binario libnss_winbind.so corrisponde
winbind_nss_linux.c:NSS_STATUS _nss_winbind_initgroups_dyn(char *user, gid_t group, long int *start,
winbind_nss_linux.c:_nss_winbind_initgroups_dyn(char *user, gid_t group, long int *start,
winbind_nss_netbsd.c:NSS_STATUS _nss_winbind_initgroups_dyn(char *user, gid_t group, long int *start,
winbind_nss_solaris.c:  _nss_winbind_initgroups_dyn(gmem->username,
winbind_nss_solaris.h:NSS_STATUS _nss_winbind_initgroups_dyn(char *user, gid_t group, long int *start,
Il file binario winbind_nss_solaris.o corrisponde

 

The libnss_winbind.so is the "broken" file,if i launch winbind with it linked to /usr/lib/hpux32/libnss_winbind.so.1

give the error

 

/usr/lib/hpux32/dld.so: Unsatisfied code symbol '_nss_winbind_initgroups_dyn' in load module '/usr/lib/hpux32/libnss_winbind.so.1'.
Killed
Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 23 of 31 (213 Views)

Re: Samba4: no way?

Can be a samba bug?Or a linker bug?

I use gnu gcc from http://hpux.connect.org.uk/

i have tried also the aCC compiler,same result.

 

Acclaimed Contributor
Posts: 25,527
Registered: ‎03-06-2006
Message 24 of 31 (199 Views)

Re: Samba4: no way?

>Can be a samba bug?  Or a linker bug?

 

Most likely a samba configuration bug.

If a linker or dld error, you should be able to manually find the shlib that contains that symbol.

Valued Contributor
Posts: 71
Registered: ‎11-25-2013
Message 25 of 31 (188 Views)

Re: Samba4: no way?

Is for sure a samba bug

because samba4 link this symbol fine.

The only problem is samba4 won't compile with mit krb5 so is useless

for my environement.

 

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.