Skip to content

mit-krb5 default plugins broken? #74

Description

@coyhile

Trying to bootstrap an MIT KDC based on mit-krb5-1.14.6, one sees the following behavior:

[root@krbtest ~]# kdb5_util create
Loading random data
Initializing database '/var/krb5kdc/principal' for realm 'LOCAL',
master key name 'K/M@LOCAL'
You will be prompted for the database Master Password.
It is important that you NOT FORGET this password.
Enter KDC database master key:
Re-enter KDC database master key to verify:
kdb5_util: Unable to load requested database module 'db2': plugin symbol 'kdb_function_table' not found while creating database '/var/krb5kdc/principal'
[root@krbtest ~]#

Looking further, we see from truss (in relevant part):

93041:  ioctl(3, TCSETS, 0xFFFFBF7FFFDFF900)            = 0
93041:  sigaction(SIGINT, 0xFFFFBF7FFFDFF7E0, 0x00000000) = 0
93041:  close(3)                                        = 0
93041:  time()                                          = 1516974864
93041:  stat("/etc/krb5.conf", 0xFFFFBF7FFFDFF670)      = 0
93041:  time()                                          = 1516974864
93041:  time()                                          = 1516974864
93041:  stat("/opt/local/lib/krb5/plugins/kdb/db2", 0xFFFFBF7FFFDFF770) Err#2 ENOENT
93041:  open("/usr/lib/locale/en_US.UTF-8/LC_MESSAGES/SUNW_OST_OSLIB.mo", O_RDONLY) Err#2 ENOENT
93041:  stat("/opt/local/lib/krb5/plugins/kdb/db2.so", 0xFFFFBF7FFFDFF770) Err#2 ENOENT
93041:  fstat(2, 0xFFFFBF7FFFDFE520)                    = 0
kdb5_util93041: write(2, " k d b 5 _ u t i l", 9)               = 9
: 93041:        write(2, " :  ", 2)                             = 2
Unable to load requested database module 'db2': plugin symbol 'kdb_function_table' not found93041:      write(2, " U n a b l e   t o   l o".., 92)      = 92
 93041: write(2, "  ", 1)                               = 1
while creating database '93041: write(2, " w h i l e   c r e a t i".., 25)      = 25
/var/krb5kdc/principal93041:    write(2, " / v a r / k r b 5 k d c".., 22)      = 22

And looking at the directory called out there, we see

[root@krbtest ~]# ls /opt/local/lib/krb5/plugins/kdb/
libdb2.la  libdb2.so
[root@krbtest ~]#

Creating a symlink allows the operation to complete successfully:

[root@krbtest ~]# ln -s /opt/local/lib/krb5/plugins/kdb/libdb2.so /opt/local/lib/krb5/plugins/kdb/db2.so
[root@krbtest ~]#  kdb5_util create
Loading random data
Initializing database '/var/krb5kdc/principal' for realm 'LOCAL',
master key name 'K/M@LOCAL'
You will be prompted for the database Master Password.
It is important that you NOT FORGET this password.
Enter KDC database master key:
Re-enter KDC database master key to verify:
[root@krbtest ~]#

Activity

  1. coyhile commented on Jan 26, 2018

    @coyhile
    Author

    The container where I was testing is [email protected]. I'll see if I can repro with the previous LTS image. ETA: same behavior with [email protected]

  2. coyhile commented on Jan 26, 2018

    @coyhile
    Author

    I built this outside the pkgsrc framework by hand, and I do not see the behavior there. In fact, the output of the default generated Makefile from configure yields lib/krb5/plugins/kdb/db2.so.

    Is it this that causes the problems here?

  3. added a commit that references this issue on Jan 28, 2018
  4. mamash commented on Feb 1, 2018

    @mamash

    Not just that single patch, but the entire patch set that injects support for pkgsrc libtool, likely. That's something that's usually desirable, because a central sanctioned libtool helps avoid all kinds of peculiar problems that different upstreams may suffer from. I'll investigate.

  5. added a commit that references this issue on Apr 5, 2018
  6. added a commit that references this issue on Jul 8, 2018
  7. added a commit that references this issue on Aug 16, 2018
  8. added a commit that references this issue on Aug 30, 2018
  9. sjorge commented on Sep 23, 2018

    @sjorge

    I also hit this bug while trying to setup a quick test kdc

    Loading random data
    Initializing database '/var/krb5kdc/principal' for realm 'ACHERON.BE',
    master key name 'K/[email protected]'
    You will be prompted for the database Master Password.
    It is important that you NOT FORGET this password.
    Enter KDC database master key:
    Re-enter KDC database master key to verify:
    kdb5_util: Unable to load requested database module 'db2': plugin symbol 'kdb_function_table' not found while creating database '/var/krb5kdc/principal'```
    
    The service to start the kdc and kadmind are also missing from the mit-krb5 package.
    
  10. added a commit that references this issue on Sep 24, 2018
  11. added a commit that references this issue on Nov 10, 2018
  12. added a commit that references this issue on Jan 20, 2019
  13. added a commit that references this issue on Nov 24, 2019
    74496fc
  14. added a commit that references this issue on Dec 11, 2019
  15. 134 remaining items

  16. added a commit that references this issue on Aug 25, 2026
  17. added a commit that references this issue on Sep 9, 2026
  18. added a commit that references this issue on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions