diff --git a/kadmin/kadmin.1 b/kadmin/kadmin.1 index f6e970776..f45a2a4ed 100644 --- a/kadmin/kadmin.1 +++ b/kadmin/kadmin.1 @@ -69,6 +69,8 @@ principal to authenticate as keytab for authentication principal .It Fl c Ar file , Fl Fl config-file= Ns Ar file location of config file +.It Fl H Ar HDB , Fl Fl hdb= Ns Ar HDB +location of HDB .It Fl k Ar file , Fl Fl key-file= Ns Ar file location of master key file .It Fl r Ar realm , Fl Fl realm= Ns Ar realm diff --git a/kadmin/kadmin.c b/kadmin/kadmin.c index 602ef91a5..d2f5abadd 100644 --- a/kadmin/kadmin.c +++ b/kadmin/kadmin.c @@ -41,6 +41,7 @@ int local_flag; static int ad_flag; static int help_flag; static int version_flag; +static char *hdb; static char *realm; static char *admin_server; static int server_port = 0; @@ -63,6 +64,10 @@ static struct getargs args[] = { "key-file", 'k', arg_string, &keyfile, "location of master key file", "file" }, + { + "hdb", 'H', arg_string, &hdb, + "HDB to use", "hdb" + }, { "realm", 'r', arg_string, &realm, "realm to use", "realm" @@ -204,6 +209,11 @@ main(int argc, char **argv) conf.mask |= KADM5_CONFIG_REALM; } + if (hdb) { + conf.dbname = hdb; + conf.mask |= KADM5_CONFIG_DBNAME; + } + if (admin_server) { conf.admin_server = admin_server; conf.mask |= KADM5_CONFIG_ADMIN_SERVER;