{"id":2351,"date":"2013-07-15T21:01:19","date_gmt":"2013-07-15T13:01:19","guid":{"rendered":"http:\/\/rmohan.com\/?p=2351"},"modified":"2013-07-16T20:01:29","modified_gmt":"2013-07-16T12:01:29","slug":"linux-kerberos-configuration-guide","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=2351","title":{"rendered":"Linux Kerberos Configuration Guide"},"content":{"rendered":"<p>SERVER auth.example.com<br \/>\n* yum install krb5-server krb5-workstation pam_krb5<br \/>\n* conf files<br \/>\n  &#8211; \/etc\/krb5.conf<br \/>\n  &#8211; \/var\/kerberos\/krb5kdc\/kdc.conf<br \/>\n  &#8211; \/var\/kerberos\/krb5kdc\/kadm5.acl<br \/>\n  &#8211; \/etc\/pam.d\/system-auth<\/p>\n<p>* kdb5_util create -r EXAMPLE.COM -s<br \/>\n* kadmin.local -q &#8220;addprinc admin\/admin&#8221;<br \/>\n* kadmin.local -q \\<br \/>\n    &#8220;ktadd -k \/var\/kerberos\/krb5kdc\/kadm5.keytab kadmin\/admin kadmin\/changepw&#8221;<br \/>\n* kadmin.local -q &#8220;addprinc testuser&#8221;<br \/>\n* kadmin.local -q &#8220;addprinc -randkey host\/auth.example.com&#8221;<br \/>\n* kadmin.local -q &#8220;ktadd -k \/etc\/krb5.keytab host\/auth.example.com&#8221;<br \/>\n* chkconfig kadmin on<br \/>\n* chkconfig krb5kdc on<br \/>\n* service kadmin start<br \/>\n* service krb5kdc start<br \/>\n* replication<br \/>\n  &#8211; http:\/\/web.mit.edu\/kerberos\/www\/krb5-1.2\/krb5-1.2.5\/doc\/install.html#SEC48<\/p>\n<p>* LDAP keytab if needed<br \/>\n  &#8211; kadmin.local -q &#8220;addprinc -randkey ldap\/auth.example.com&#8221;<br \/>\n  &#8211; kadmin.local -q &#8220;ktadd -k \/etc\/openldap\/ldap.keytab ldap\/auth.example.com&#8221;<br \/>\n* HTTP keytab if needed (case sensitive)<br \/>\n  &#8211; kadmin.local -q &#8220;addprinc -randkey HTTP\/auth.example.com&#8221;<br \/>\n  &#8211; kadmin.local -q &#8220;ktadd -k \/etc\/httpd\/httpd.keytab HTTP\/auth.example.com&#8221;<br \/>\n* Firefox with Kerberos:<br \/>\n  &#8211; From about:config set to .example.com<br \/>\n      &#8211; network.negotiate-auth.delegation-uris<br \/>\n      &#8211; network.negotiate-auth.trusted-uris<br \/>\n  &#8211; run kinit and restart firefox<\/p>\n<p>CLIENT test.example.com<br \/>\n* yum install krb5-workstation pam_krb5<br \/>\n* conf files<br \/>\n  &#8211; \/etc\/krb5.conf<br \/>\n  &#8211; \/etc\/pam.d\/system-auth<\/p>\n<p>* host keytab if needed for ssh<br \/>\n  &#8211; kinit admin\/admin<br \/>\n  &#8211; kadmin -q &#8220;addprinc -randkey host\/test.example.com&#8221;<br \/>\n  &#8211; kadmin -q &#8220;ktadd -k \/etc\/krb5.keytab host\/test.example.com&#8221;<\/p>\n<p>CROSS REALM<br \/>\n* On both KDCs for SUB.EXAMPLE.COM to trust EXAMPLE.COM (one-way trust):<br \/>\n  &#8211; kinit admin\/admin<br \/>\n  &#8211; kadmin -q &#8220;addprinc krbtgt\/SUB.EXAMPLE.COM@EXAMPLE.COM&#8221;<br \/>\n* echo user@EXAMPLE.COM >> ~user\/.k5login on each SUB.EXAMPLE.COM realm host<br \/>\n* use pam_access.so in \/etc\/pam.d\/system-auth to limit access as needed<br \/>\n* add EXAMPLE.COM into [realms] and [domain_realm] in krb5.conf<br \/>\n  in SUB.EXAMPLE.COM as needed<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SERVER auth.example.com * yum install krb5-server krb5-workstation pam_krb5 * conf files &#8211; \/etc\/krb5.conf &#8211; \/var\/kerberos\/krb5kdc\/kdc.conf &#8211; \/var\/kerberos\/krb5kdc\/kadm5.acl &#8211; \/etc\/pam.d\/system-auth<\/p>\n<p>* kdb5_util create -r EXAMPLE.COM -s * kadmin.local -q &#8220;addprinc admin\/admin&#8221; * kadmin.local -q \\ &#8220;ktadd -k \/var\/kerberos\/krb5kdc\/kadm5.keytab kadmin\/admin kadmin\/changepw&#8221; * kadmin.local -q &#8220;addprinc testuser&#8221; * kadmin.local -q &#8220;addprinc -randkey host\/auth.example.com&#8221; * kadmin.local -q &#8220;ktadd -k [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2351"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2351"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2351\/revisions"}],"predecessor-version":[{"id":2390,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2351\/revisions\/2390"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}