These steps assume you are trying to authenticate myuser@puffer.jibcnet.ca against the domain EXAMPLE.CA. The domain controller is kdc.EXAMPLE.CA. The OpenBSD host that will be doing authentication request is puffer.example.ca
ktpass -out c:\tmp\puffer.keytab -princ host/puffer.example.ca@EXAMPLE.CA -mapuser puffer -pType KRB5_NT_PRINCIPAL +rndpassktutil copy /etc/puffer.keytab /etc/kerberosV/krb5.keytab
[libdefaults]
# Set the realm of this host here
default_realm = EXAMPLE.CA
# Maximum allowed time difference between KDC and this host
clockskew = 300
# Uncomment this if you run NAT on the client side of kauth.
# This may be considered a security issue though.
# no-addresses = yes
[realms]
EXAMPLE.CA = {
default_domain = example.ca
# Specify KDC here
kdc = kerberos.example.ca
# Administration server, used for creating users etc.
admin_server = kerberos.example.ca
}
# Example of a "foreign" realm
OTHER.REALM = {
kdc = kerberos.other.domain
default_domain = other.domain
v4_domains = other.domain
}
# This sections describes how to figure out a realm given a DNS name
[domain_realm]
.example.ca = EXAMPLE.CA
[kadmin]
# This is the trickiest part of a Kerberos installation. See the
# heimdal infopage for more information about encryption types.
# For a k5 only realm, this will be fine
# default_keys = v5
[logging]
# The KDC logs by default, but it's nice to have a kadmind log as well.
kadmind = FILE:/var/heimdal/kadmind.log
$ kinit admin@EXAMPLE.CA
admin@EXAMPLE.CA's Password:
$ klist
Credentials cache: FILE:/tmp/krb5cc_1000
Principal: admin@EXAMPLE.CA
Issued Expires Principal
Sep 4 11:50:58 Sep 4 21:48:12 krbtgt/EXAMPLE.CA@EXAMPLE.CA
$
:tc=auth-defaults:\
And add above it:
:auth=krb5-or-pwd:\
Like this:
default:\
:path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin:\
:umask=022:\
:datasize-max=512M:\
:datasize-cur=512M:\
:maxproc-max=128:\
:maxproc-cur=64:\
:openfiles-cur=128:\
:stacksize-cur=4M:\
:localcipher=blowfish,6:\
:ypcipher=old:\
:auth=krb5-or-pwd:\
:tc=auth-defaults:\
:tc=auth-ftp-defaults: