<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.unixcat.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ToroidalCore</id>
	<title>Unixcat.net Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.unixcat.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ToroidalCore"/>
	<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php/Special:Contributions/ToroidalCore"/>
	<updated>2026-04-24T17:24:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Should_You_Switch_to_Linux%3F&amp;diff=87</id>
		<title>Should You Switch to Linux?</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Should_You_Switch_to_Linux%3F&amp;diff=87"/>
		<updated>2024-02-10T09:18:11Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: At the moment this article is unfinished.&lt;br /&gt;
&lt;br /&gt;
Most desktop computing is dominated by the Windows operating system from Microsoft.  There&#039;s a good chance you&#039;re reading this on a Windows machine, although you really might not be.  It might be running macOS as well, or maybe it could be a phone or tablet running Android or iOS.  Or something else.  Or, you might very well be reading this on a Linux machine...  Or some sort of BSD.  You get the idea.  One way or another, you&#039;re reading it.&lt;br /&gt;
&lt;br /&gt;
But you are a a computer user of some sort.  And if you primarily use Windows or macOS, you may or may not be contemplating using Linux on your desktop.  There are different reasons for this.  Maybe the idea of it or the philosophy behind it sounds interesting, or maybe you&#039;re just curious about it.  Maybe you need it for work.  Or, you&#039;re just frustrated with the system you already use, and want to try an alternative.  Maybe people have recommended it to you.  Or perhaps tried to discourage you from trying it.  &lt;br /&gt;
&lt;br /&gt;
I pretty much use it exclusively outside of work as my &amp;quot;daily driver,&amp;quot; and have for years, and plan to continue doing so.  Does this mean I think it&#039;s the greatest thing ever?  Not really.  I&#039;ve had my share of ups and downs with it, and have had my share of frustration with it.  I keep using it because it works for me, and overall I&#039;m happy with it.  The purpose of this page is to give an account of Linux as a desktop system from my point of view, to encourage you to try it, or discourage you, but mostly just to lay out what it is.&lt;br /&gt;
&lt;br /&gt;
== Who This is For ==&lt;br /&gt;
&lt;br /&gt;
This page is intended for a variety of people.  Obviously, for anyone giving some thought into daily driving a Linux-based system, but there are some particular types of computer users I have in mind.  The important thing I&#039;ll point out is that I will try to strike a balance between Note that it&#039;s quite possible to fall into or between these groups, or outside of them completely.  You don&#039;t have to fall in line exactly, these are just some examples. :)&lt;br /&gt;
&lt;br /&gt;
=== Power Users ===&lt;br /&gt;
&lt;br /&gt;
This is someone who uses Windows and/or macOS routinely for a certain set of tasks, professionally or at home.  This person probably does this enough that they&#039;ve put some effort into streamlining what they do, ie customizing their system to some extent, and learning ins and outs like keyboard shortcuts.&lt;br /&gt;
&lt;br /&gt;
=== Causal Users ===&lt;br /&gt;
&lt;br /&gt;
This is someone for whom the computer is kind of like an appliance, someone who boots it up now and then to check on something or do some one-off task.  I imagine this to be someone who types a document now and then, checks email or social media, or browses the web.  The computer is most definitely general purpose, and they may or may not have deep familiarity with the operating system they use.  Unlike the power user, this type&#039;s usage patterns are less rigid.&lt;br /&gt;
&lt;br /&gt;
=== Enthusiast ===&lt;br /&gt;
&lt;br /&gt;
This person is generally interested in computers, and may own several of them.  They may actually run Linux or some other Unix-like system on some machine, and be contemplating using it as their main desktop.  This person will probably be interested in exploring how the OS on their computer works, and what it can do.  They may also have more tolerance for problems that arise due to bugs or mistakes.&lt;br /&gt;
&lt;br /&gt;
=== Required For Something ===&lt;br /&gt;
&lt;br /&gt;
This type of user needs to learn Linux for a specific reason, like for work or school.  Could also be secondary to some other interest, such as an enthusiast who wants to learn Linux for a Raspberry Pi project, for example.&lt;br /&gt;
&lt;br /&gt;
=== Anyone Growing Their Skills ===&lt;br /&gt;
&lt;br /&gt;
Similar to the enthusiast, or someone who needs it for something, this person just wants to gain a new skill.&lt;br /&gt;
&lt;br /&gt;
=== Looking for Something Different ===&lt;br /&gt;
&lt;br /&gt;
This person just wants a change.  I don&#039;t know how how likely it is for someone to be learning Linux for this reason, but I can imagine someone just wanting a different computing environment to escape to for some reason, perhaps to put one into a different state of mind.&lt;br /&gt;
&lt;br /&gt;
=== Misc ===&lt;br /&gt;
&lt;br /&gt;
As I mentioned, you may fit into one, several, or none of these as per your specific circumstances.&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop_Linux]]&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Should_You_Switch_to_Linux%3F&amp;diff=86</id>
		<title>Should You Switch to Linux?</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Should_You_Switch_to_Linux%3F&amp;diff=86"/>
		<updated>2024-02-10T09:01:59Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: At the moment this article is unfinished.&lt;br /&gt;
&lt;br /&gt;
Most desktop computing is dominated by the Windows operating system from Microsoft.  There&#039;s a good chance you&#039;re reading this on a Windows machine, although you really might not be.  It might be running macOS as well, or maybe it could be a phone or tablet running Android or iOS.  Or something else.  Or, you might very well be reading this on a Linux machine...  Or some sort of BSD.  You get the idea.  One way or another, you&#039;re reading it.&lt;br /&gt;
&lt;br /&gt;
But you are a a computer user of some sort.  And if you primarily use Windows or macOS, you may or may not be contemplating using Linux on your desktop.  There are different reasons for this.  Maybe the idea of it or the philosophy behind it sounds interesting, or maybe you&#039;re just curious about it.  Maybe you need it for work.  Or, you&#039;re just frustrated with the system you already use, and want to try an alternative.  Maybe people have recommended it to you.  Or perhaps tried to discourage you from trying it.  &lt;br /&gt;
&lt;br /&gt;
I pretty much use it exclusively outside of work as my &amp;quot;daily driver,&amp;quot; and have for years, and plan to continue doing so.  Does this mean I think it&#039;s the greatest thing ever?  Not really.  I&#039;ve had my share of ups and downs with it, and have had my share of frustration with it.  I keep using it because it works for me, and overall I&#039;m happy with it.  The purpose of this page is to give an account of Linux as a desktop system from my point of view, to encourage you to try it, or discourage you, but mostly just to lay out what it is.&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
&lt;br /&gt;
This page is intended for a variety of people.  Obviously, for anyone giving some thought into daily driving a Linux-based system, but there are some particular types of computer users I have in mind.  Note that it&#039;s quite possible to fall into or between these groups, or outside of them completely.  You don&#039;t have to fall in line exactly, these are just some examples. :)&lt;br /&gt;
&lt;br /&gt;
=== Power Users ===&lt;br /&gt;
&lt;br /&gt;
This is someone who uses Windows and/or macOS routinely for a certain set of tasks, professionally or at home.  This person probably does this enough that they&#039;ve put some effort into streamlining what they do, ie customizing their system to some extent, and learning ins and outs like keyboard shortcuts.&lt;br /&gt;
&lt;br /&gt;
=== Causal Users ===&lt;br /&gt;
&lt;br /&gt;
This is someone for whom the computer is kind of like an appliance, someone who boots it up now and then to check on something or do some one-off task.  I imagine this to be someone who types a document now and then, checks email or social media, or browses the web.  The computer is most definitely general purpose, and they may or may not have deep familiarity with the operating system they use.  &lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop_Linux]]&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Should_You_Switch_to_Linux%3F&amp;diff=85</id>
		<title>Should You Switch to Linux?</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Should_You_Switch_to_Linux%3F&amp;diff=85"/>
		<updated>2024-01-22T06:30:51Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: At the moment this article is unfinished.&lt;br /&gt;
&lt;br /&gt;
Most desktop computing is dominated by the Windows operating system from Microsoft.  There&#039;s a good chance you&#039;re reading this on a Windows machine, although you really might not be.  It might be running macOS as well, or maybe it could be a phone or tablet running Android or iOS.  Or something else.  Or, you might very well be reading this on a Linux machine...  Or some sort of BSD.  You get the idea.  One way or another, you&#039;re reading it.&lt;br /&gt;
&lt;br /&gt;
But you are a a computer user of some sort.  And if you primarily use Windows or macOS, you may or may not be contemplating using Linux on your desktop.  There are different reasons for this.  Maybe the idea of it or the philosophy behind it sounds interesting, or maybe you&#039;re just curious about it.  Maybe you need it for work.  Or, you&#039;re just frustrated with the system you already use, and want to try an alternative.  Maybe people have recommended it to you.  Or perhaps tried to discourage you from trying it.  &lt;br /&gt;
&lt;br /&gt;
I pretty much use it exclusively outside of work as my &amp;quot;daily driver,&amp;quot; and have for years, and plan to continue doing so.  Does this mean I think it&#039;s the greatest thing ever?  Not really.  I&#039;ve had my share of ups and downs with it, and have had my share of frustration with it.  I keep using it because it works for me, and overall I&#039;m happy with it.  The purpose of this page is to give an account of Linux as a desktop system from my point of view, to encourage you to try it, or discourage you, but mostly just to lay out what it is.&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop_Linux]]&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Should_You_Switch_to_Linux%3F&amp;diff=84</id>
		<title>Should You Switch to Linux?</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Should_You_Switch_to_Linux%3F&amp;diff=84"/>
		<updated>2024-01-22T06:13:48Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;**Note: At the moment this article is unfinished.&lt;br /&gt;
&lt;br /&gt;
Most desktop computing is dominated by the Windows operating system from Microsoft.  There&#039;s a good chance you&#039;re reading this on a Windows machine, although you really might not be.  It might be running macOS as well, or maybe it could be a phone or tablet running Android or iOS.  Or something else.  Or, you might very well be reading this on a Linux machine...  Or some sort of BSD.  You get the idea.  One way or another, you&#039;re reading it.&lt;br /&gt;
&lt;br /&gt;
But you are a a computer user of some sort.  And if you primarily use Windows or macOS, you may or may not be contemplating using Linux on your desktop.  I pretty much use it exclusively outside of work as my &amp;quot;daily driver,&amp;quot; &lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop_Linux]]&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Should_You_Switch_to_Linux%3F&amp;diff=83</id>
		<title>Should You Switch to Linux?</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Should_You_Switch_to_Linux%3F&amp;diff=83"/>
		<updated>2024-01-22T06:06:34Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: Created page with &amp;quot;  Category:Desktop_Linux&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop_Linux]]&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Category:Desktop_Linux&amp;diff=82</id>
		<title>Category:Desktop Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Category:Desktop_Linux&amp;diff=82"/>
		<updated>2024-01-22T06:05:35Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Desktop-specific pages for GNU/Linux and other *nix systems (eg BSDs).  Basically, this means using these systems as workstations, primarily graphical.&lt;br /&gt;
&lt;br /&gt;
Includes howtos, workflows, etc.&lt;br /&gt;
&lt;br /&gt;
[[Category:UnixLike]]&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Main_Page&amp;diff=81</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Main_Page&amp;diff=81"/>
		<updated>2024-01-05T08:39:15Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the Unixcat.net wiki.  Here you will find different articles and pages that I don&#039;t feel fit into the [https://blog.unixcat.net blog] format.  These include things like how-tos, descriptions of projects, and other pages I&#039;m not publishing in chronological order.&lt;br /&gt;
&lt;br /&gt;
Note that at some point in the future, this may disappear if I decide to present it all in some other way.  For now, though, wiki it is.&lt;br /&gt;
&lt;br /&gt;
=== Some Categories to Check Out ===&lt;br /&gt;
&lt;br /&gt;
[[:Category:Desktop Linux]]&lt;br /&gt;
&lt;br /&gt;
Not just GNU/Linux.  Tips, tricks, notes, etc. on using *nix systems on the desktop.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Main_Page&amp;diff=80</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Main_Page&amp;diff=80"/>
		<updated>2024-01-05T08:38:58Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the Unixcat.net wiki.  Here you will find different articles and pages that I don&#039;t feel fit into the [https://blog.unixcat.net blog] format.  These include things like how-tos, descriptions of projects, and other pages I&#039;m not publishing in chronological order.&lt;br /&gt;
&lt;br /&gt;
Note that at some point in the future, this may disappear if I decide to present it all in some other way.  For now, though, wiki it is.&lt;br /&gt;
&lt;br /&gt;
{{Special:RecentChanges}}&lt;br /&gt;
&lt;br /&gt;
=== Some Categories to Check Out ===&lt;br /&gt;
&lt;br /&gt;
[[:Category:Desktop Linux]]&lt;br /&gt;
&lt;br /&gt;
Not just GNU/Linux.  Tips, tricks, notes, etc. on using *nix systems on the desktop.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=FFMPEG_Commands&amp;diff=79</id>
		<title>FFMPEG Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=FFMPEG_Commands&amp;diff=79"/>
		<updated>2024-01-05T06:47:44Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here are some FFMPEG scripts I&#039;ve come up with for various things, mostly converting media of one format to another.  Many of the scripts are working on the Bourne Shell on FreeBSD, since that&#039;s where I&#039;m converting most of my media at the moment.  They haven&#039;t been tested in Bash, but should work.&lt;br /&gt;
&lt;br /&gt;
You should have some familiarity with FFMPEG and shell scripting.  These are provided as a convenience; use at your own risk and be sure to make backups.  I am not responsible for any loss of data as a result of using these!&lt;br /&gt;
&lt;br /&gt;
== Video ==&lt;br /&gt;
&lt;br /&gt;
Converting video from one format or container to another.  Lines that look like this are meant to just be run as a single command at the terminal:&lt;br /&gt;
&lt;br /&gt;
 $ ffmpeg -i infile.avi outfile.mp4&lt;br /&gt;
&lt;br /&gt;
Whereas something meant to run as a script will look like this:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 ffmpeg -i infile.avi outfile.mp4&lt;br /&gt;
&lt;br /&gt;
The above should go in a text file and be made executable.&lt;br /&gt;
&lt;br /&gt;
Unless otherwise noted, the scripts are meant to be run in a directory full of files you want to convert.  You can put the script someplace like &amp;lt;code&amp;gt;~/bin&amp;lt;/code&amp;gt;, change to the directory, and just run it.  If you have a lot of files something like &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; is recommended.&lt;br /&gt;
&lt;br /&gt;
=== Convert Video to x264 ===&lt;br /&gt;
&lt;br /&gt;
This script is useful if you have a device that&#039;s older and just plays x264-encoded files.  You probably need &amp;lt;code&amp;gt;libx264&amp;lt;/code&amp;gt; installed.&lt;br /&gt;
&lt;br /&gt;
x264conv.sh&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 for i in *.mp4 *.mkv&lt;br /&gt;
 do&lt;br /&gt;
         j=$(echo $i | sed &#039;s/x265/x264/g&#039;)&lt;br /&gt;
         ffmpeg -i &amp;quot;$i&amp;quot; -acodec copy -vcodec h264 &amp;quot;$j&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
This assumes that the file has x265 in the name.  It writes a new file with x265 changed to x264, which is reencoded to x264.  You&#039;ll have to go in and delete the x265 files if you don&#039;t want to save them.  You should probably also check that the new x264 files play correctly.&lt;br /&gt;
&lt;br /&gt;
=== Convert 10 Bit HEVC x265 to 8 Bit x264 ===&lt;br /&gt;
&lt;br /&gt;
Some devices don&#039;t like 10 bit HEVC x265 files.  This converts the files to x264.&lt;br /&gt;
&lt;br /&gt;
10to8x264.sh&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 for i in *.mp4 *.mkv&lt;br /&gt;
 do&lt;br /&gt;
         j=$(echo $i | sed &#039;s/x265/x264/g&#039;)&lt;br /&gt;
         ffmpeg -i &amp;quot;$i&amp;quot; -map 0 -c:v libx264 -crf 18 -vf format=yuv420p -c:a copy &amp;quot;$j&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
See this [https://superuser.com/questions/1380946/how-do-i-convert-10-bit-h-265-hevc-videos-to-h-264-without-quality-loss SuperUser page] for reference.  As before, x265 is renamed to x264 for the new file.  Run this in a directory and delete the old files if desired, after verifying the new ones play.&lt;br /&gt;
[[Category:Multimedia]]&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=FFMPEG_Commands&amp;diff=78</id>
		<title>FFMPEG Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=FFMPEG_Commands&amp;diff=78"/>
		<updated>2024-01-05T06:47:20Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here are some FFMPEG scripts I&#039;ve come up with for various things, mostly converting media of one format to another.  Many of the scripts are working on the Bourne Shell on FreeBSD, since that&#039;s where I&#039;m converting most of my media at the moment.  They haven&#039;t been tested in Bash, but should work.&lt;br /&gt;
&lt;br /&gt;
You should have some familiarity with FFMPEG and shell scripting.  These are provided as a convenience; use at your own risk and be sure to make backups.  I am not responsible for any loss of data as a result of using these!&lt;br /&gt;
&lt;br /&gt;
== Video ==&lt;br /&gt;
&lt;br /&gt;
Converting video from one format or container to another.  Lines that look like this are meant to just be run as a single command at the terminal:&lt;br /&gt;
&lt;br /&gt;
 $ ffmpeg -i infile.avi outfile.mp4&lt;br /&gt;
&lt;br /&gt;
Whereas something meant to run as a script will look like this:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 ffmpeg -i infile.avi outfile.mp4&lt;br /&gt;
&lt;br /&gt;
The above should go in a text file and be made executable.&lt;br /&gt;
&lt;br /&gt;
Unless otherwise noted, the scripts are meant to be run in a directory full of files you want to convert.  You can put the script someplace like &amp;lt;code&amp;gt;~/bin&amp;lt;/code&amp;gt;, change to the directory, and just run it.  If you have a lot of files something like &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; is recommended.&lt;br /&gt;
&lt;br /&gt;
=== Convert Video to x264 ===&lt;br /&gt;
&lt;br /&gt;
This script is useful if you have a device that&#039;s older and just plays x264-encoded files.  You probably need &amp;lt;code&amp;gt;libx264&amp;lt;/code&amp;gt; installed.&lt;br /&gt;
&lt;br /&gt;
x264conv.sh&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 for i in *.mp4 *.mkv&lt;br /&gt;
 do&lt;br /&gt;
         j=$(echo $i | sed &#039;s/x265/x264/g&#039;)&lt;br /&gt;
         ffmpeg -i &amp;quot;$i&amp;quot; -acodec copy -vcodec h264 &amp;quot;$j&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
This assumes that the file has x265 in the name.  It writes a new file with x265 changed to x264, which is reencoded to x264.  You&#039;ll have to go in and delete the x265 files if you don&#039;t want to save them.  You should probably also check that the new x264 files play correctly.&lt;br /&gt;
&lt;br /&gt;
=== Convert 10 Bit HEVC x265 to 8 Bit x264 ===&lt;br /&gt;
&lt;br /&gt;
Some devices don&#039;t like 10 bit HEVC x265 files.  This converts the files to x264.&lt;br /&gt;
&lt;br /&gt;
10to8x264.sh&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 for i in *.mp4 *.mkv&lt;br /&gt;
 do&lt;br /&gt;
         j=$(echo $i | sed &#039;s/x265/x264/g&#039;)&lt;br /&gt;
         ffmpeg -i &amp;quot;$i&amp;quot; -map 0 -c:v libx264 -crf 18 -vf format=yuv420p -c:a copy &amp;quot;$j&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
See this [https://superuser.com/questions/1380946/how-do-i-convert-10-bit-h-265-hevc-videos-to-h-264-without-quality-loss SuperUser page] As before, x265 is renamed to x264 for the new file.  Run this in a directory and delete the old files if desired, after verifying the new ones play.&lt;br /&gt;
[[Category:Multimedia]]&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Category:Multimedia&amp;diff=77</id>
		<title>Category:Multimedia</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Category:Multimedia&amp;diff=77"/>
		<updated>2024-01-05T06:43:56Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Articles about manipulating multimedia on Unixlike systems, mainly Linux.  This includes sound and video for things like recording and composing music, editing video, visual effects, etc., as well as format conversion.&lt;br /&gt;
&lt;br /&gt;
[[Category:UnixLike]]&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Category:Multimedia&amp;diff=76</id>
		<title>Category:Multimedia</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Category:Multimedia&amp;diff=76"/>
		<updated>2024-01-05T06:43:23Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: Created page with &amp;quot;Articles about manipulating multimedia on Unixlike systems, mainly Linux.  This includes sound and video for things like recording and composing music, editing video, visual effects, etc., as well as format conversion.  Category:Unixlike&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Articles about manipulating multimedia on Unixlike systems, mainly Linux.  This includes sound and video for things like recording and composing music, editing video, visual effects, etc., as well as format conversion.&lt;br /&gt;
&lt;br /&gt;
[[Category:Unixlike]]&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=FFMPEG_Commands&amp;diff=75</id>
		<title>FFMPEG Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=FFMPEG_Commands&amp;diff=75"/>
		<updated>2024-01-05T06:41:58Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here are some FFMPEG scripts I&#039;ve come up with for various things, mostly converting media of one format to another.  Many of the scripts are working on the Bourne Shell on FreeBSD, since that&#039;s where I&#039;m converting most of my media at the moment.  They haven&#039;t been tested in Bash, but should work.&lt;br /&gt;
&lt;br /&gt;
You should have some familiarity with FFMPEG and shell scripting.  These are provided as a convenience; use at your own risk and be sure to make backups.  I am not responsible for any loss of data as a result of using these!&lt;br /&gt;
&lt;br /&gt;
== Video ==&lt;br /&gt;
&lt;br /&gt;
Converting video from one format or container to another.  Lines that look like this are meant to just be run as a single command at the terminal:&lt;br /&gt;
&lt;br /&gt;
 $ ffmpeg -i infile.avi outfile.mp4&lt;br /&gt;
&lt;br /&gt;
Whereas something meant to run as a script will look like this:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 ffmpeg -i infile.avi outfile.mp4&lt;br /&gt;
&lt;br /&gt;
The above should go in a text file and be made executable.&lt;br /&gt;
&lt;br /&gt;
Unless otherwise noted, the scripts are meant to be run in a directory full of files you want to convert.  You can put the script someplace like &amp;lt;code&amp;gt;~/bin&amp;lt;/code&amp;gt;, change to the directory, and just run it.  If you have a lot of files something like &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; is recommended.&lt;br /&gt;
&lt;br /&gt;
=== Convert Video to x264 ===&lt;br /&gt;
&lt;br /&gt;
This script is useful if you have a device that&#039;s older and just plays x264-encoded files.  You probably need &amp;lt;code&amp;gt;libx264&amp;lt;/code&amp;gt; installed.&lt;br /&gt;
&lt;br /&gt;
x264conv.sh&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 for i in *.mp4 *.mkv&lt;br /&gt;
 do&lt;br /&gt;
         j=$(echo $i | sed &#039;s/x265/x264/g&#039;)&lt;br /&gt;
         ffmpeg -i &amp;quot;$i&amp;quot; -acodec copy -vcodec h264 &amp;quot;$j&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
This assumes that the file has x265 in the name.  It writes a new file with x265 changed to x264, which is reencoded to x264.  You&#039;ll have to go in and delete the x265 files if you don&#039;t want to save them.  You should probably also check that the new x264 files play correctly.&lt;br /&gt;
&lt;br /&gt;
=== Convert 10 Bit HEVC x265 to 8 Bit x264 ===&lt;br /&gt;
&lt;br /&gt;
Some devices don&#039;t like 10 bit HEVC x265 files.  This converts the files to x264.&lt;br /&gt;
&lt;br /&gt;
10to8x264.sh&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 for i in *.mp4 *.mkv&lt;br /&gt;
 do&lt;br /&gt;
         j=$(echo $i | sed &#039;s/x265/x264/g&#039;)&lt;br /&gt;
         ffmpeg -i &amp;quot;$i&amp;quot; -map 0 -c:v libx264 -crf 18 -vf format=yuv420p -c:a copy &amp;quot;$j&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
As before, x265 is renamed to x264 for the new file.  Run this in a directory and delete the old files if desired, after verifying the new ones play.&lt;br /&gt;
[[Category:Multimedia]]&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=FFMPEG_Commands&amp;diff=74</id>
		<title>FFMPEG Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=FFMPEG_Commands&amp;diff=74"/>
		<updated>2024-01-05T06:41:21Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here are some FFMPEG scripts I&#039;ve come up with for various things, mostly converting media of one format to another.  Many of the scripts are working on the Bourne Shell on FreeBSD, since that&#039;s where I&#039;m converting most of my media at the moment.  They haven&#039;t been tested in Bash, but should work.&lt;br /&gt;
&lt;br /&gt;
You should have some familiarity with FFMPEG and shell scripting.  These are provided as a convenience; use at your own risk and be sure to make backups.  I am not responsible for any loss of data as a result of using these!&lt;br /&gt;
&lt;br /&gt;
== Video ==&lt;br /&gt;
&lt;br /&gt;
Converting video from one format or container to another.  Lines that look like this are meant to just be run as a single command at the terminal:&lt;br /&gt;
&lt;br /&gt;
 $ ffmpeg -i infile.avi outfile.mp4&lt;br /&gt;
&lt;br /&gt;
Whereas something meant to run as a script will look like this:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 ffmpeg -i infile.avi outfile.mp4&lt;br /&gt;
&lt;br /&gt;
The above should go in a text file and be made executable.&lt;br /&gt;
&lt;br /&gt;
Unless otherwise noted, the scripts are meant to be run in a directory full of files you want to convert.  You can put the script someplace like &amp;lt;code&amp;gt;~/bin&amp;lt;/code&amp;gt;, change to the directory, and just run it.  If you have a lot of files something like &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; is recommended.&lt;br /&gt;
&lt;br /&gt;
=== Convert Video to x264 ===&lt;br /&gt;
&lt;br /&gt;
This script is useful if you have a device that&#039;s older and just plays x264-encoded files.  You probably need &amp;lt;code&amp;gt;libx264&amp;lt;/code&amp;gt; installed.&lt;br /&gt;
&lt;br /&gt;
x264conv.sh&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 for i in *.mp4 *.mkv&lt;br /&gt;
 do&lt;br /&gt;
         j=$(echo $i | sed &#039;s/x265/x264/g&#039;)&lt;br /&gt;
         ffmpeg -i &amp;quot;$i&amp;quot; -acodec copy -vcodec h264 &amp;quot;$j&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
This assumes that the file has x265 in the name.  It writes a new file with x265 changed to x264, which is reencoded to x264.  You&#039;ll have to go in and delete the x265 files if you don&#039;t want to save them.  You should probably also check that the new x264 files play correctly.&lt;br /&gt;
&lt;br /&gt;
=== Convert 10 Bit HEVC x265 to 8 Bit x264 ===&lt;br /&gt;
&lt;br /&gt;
Some devices don&#039;t like 10 bit HEVC x265 files.  This converts the files to x264.&lt;br /&gt;
&lt;br /&gt;
10to8x264.sh&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 for i in *.mp4 *.mkv&lt;br /&gt;
 do&lt;br /&gt;
         j=$(echo $i | sed &#039;s/x265/x264/g&#039;)&lt;br /&gt;
 	     ffmpeg -i &amp;quot;$i&amp;quot; -map 0 -c:v libx264 -crf 18 -vf format=yuv420p -c:a copy &amp;quot;$j&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
As before, x265 is renamed to x264 for the new file.  Run this in a directory and delete the old files if desired, after verifying the new ones play.&lt;br /&gt;
[[Category:Multimedia]]&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=FFMPEG_Commands&amp;diff=73</id>
		<title>FFMPEG Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=FFMPEG_Commands&amp;diff=73"/>
		<updated>2024-01-05T06:30:34Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: Created page with &amp;quot;Here are some FFMPEG scripts I&amp;#039;ve come up with for various things, mostly converting media of one format to another.  == Video ==  Converting video from one format or container to another.  Lines that look like this are meant to just be run as a single command at the terminal:   $ ffmpeg -i infile.avi outfile.mp4  Whereas something meant to run as a script will look like this:   #!/bin/sh    ffmpeg -i infile.avi outfile.mp4  The above should go in a text file and be made...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here are some FFMPEG scripts I&#039;ve come up with for various things, mostly converting media of one format to another.&lt;br /&gt;
&lt;br /&gt;
== Video ==&lt;br /&gt;
&lt;br /&gt;
Converting video from one format or container to another.  Lines that look like this are meant to just be run as a single command at the terminal:&lt;br /&gt;
&lt;br /&gt;
 $ ffmpeg -i infile.avi outfile.mp4&lt;br /&gt;
&lt;br /&gt;
Whereas something meant to run as a script will look like this:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 ffmpeg -i infile.avi outfile.mp4&lt;br /&gt;
&lt;br /&gt;
The above should go in a text file and be made executable.&lt;br /&gt;
&lt;br /&gt;
=== Convert Video to x264 ===&lt;br /&gt;
&lt;br /&gt;
This script is useful if you have a device that&#039;s older and just plays x264-encoded files.  You probably need &amp;lt;code&amp;gt;libx264&amp;lt;/code&amp;gt; installed.&lt;br /&gt;
&lt;br /&gt;
x264conv.sh&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 for i in *.mp4 *.mkv&lt;br /&gt;
 do&lt;br /&gt;
         j=$(echo $i | sed &#039;s/x265/x264/g&#039;)&lt;br /&gt;
         ffmpeg -i &amp;quot;$i&amp;quot; -acodec copy -vcodec h264 &amp;quot;$j&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
This assumes that the file has x265 in the name.  It writes a new file with x265 changed to x264, which is reencoded to x264.  You&#039;ll have to go in and delete the x265 files if you don&#039;t want to save them.  You should probably also check that the new x264 files play correctly.&lt;br /&gt;
[[Category:Multimedia]]&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Category:UnixLike&amp;diff=72</id>
		<title>Category:UnixLike</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Category:UnixLike&amp;diff=72"/>
		<updated>2024-01-05T05:58:19Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: Created page with &amp;quot;Unixlike systems are computer operating systems such as the myriad of GNU/Linux distributions, the BSDs, MacOS, Irix, etc.  This category will mostly focus on computing with Linux and BSD systems.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Unixlike systems are computer operating systems such as the myriad of GNU/Linux distributions, the BSDs, MacOS, Irix, etc.  This category will mostly focus on computing with Linux and BSD systems.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Category:Desktop_Linux&amp;diff=71</id>
		<title>Category:Desktop Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Category:Desktop_Linux&amp;diff=71"/>
		<updated>2024-01-05T05:56:43Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Desktop-specific pages for GNU/Linux and other *nix systems (eg BSDs).  Includes howtos, workflows, etc.&lt;br /&gt;
&lt;br /&gt;
[[Category:UnixLike]]&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=70</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=70"/>
		<updated>2023-05-22T03:29:46Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Set up LDAP for authorization, so users and the system can retrieve information such as UIDs and GIDs, and group membership. &lt;br /&gt;
# Configure BSD auth so that users can log in to the system with the password for their Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
** An account/LDAP entry in the above directory server, with a host principal for the OpenBSD machine.&lt;br /&gt;
** A normal user account with an LDAP entry and Kerberos principal, that you want to be able to use to log into the OpenBSD machine.&lt;br /&gt;
** Another client machine pointing toward the Kerberos/LDAP server for troubleshooting purposes is helpful.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and the appropriate CA certificate installed on the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;/code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;br /&gt;
&lt;br /&gt;
= 2. LDAP Client =&lt;br /&gt;
&lt;br /&gt;
You probably have user-related information that you want to store centrally.  This includes not only system-related things like user and group IDs, but also other user information such as email addresses, SSH keys, phone numbers, etc.  LDAP can even be used to store things like photos, and with some scripting you have a lot of options.  Some of what is stored in LDAP should be restricted, eg the user shouldn&#039;t be able to change their UID.  On the other hand, they may need to edit something else, like their phone number.  What they can and can&#039;t edit and how to set this up is outside the scope of this document.&lt;br /&gt;
&lt;br /&gt;
This guide assumes you are authenticating the users connecting to the LDAP server.  The command line client can do this using the user&#039;s Kerberos principal using the Generic Security Services Application Programming Interface (GSSAPI).  In order to use it, you must have set up Kerberos as in the previous section.&lt;br /&gt;
&lt;br /&gt;
=== Install the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Install the LDAP client with GSSAPI support as follows:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv openldap-client&lt;br /&gt;
&lt;br /&gt;
Select the option for the package supporting GSSAPI and hit Enter.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Edit &amp;lt;code&amp;gt;/etc/openldap/openldap.conf&amp;lt;/code&amp;gt;.  The uncommented lines should look something like this:&lt;br /&gt;
&lt;br /&gt;
 BASE            dc=example,dc=net&lt;br /&gt;
 URI             ldap://krbldapsrv.example.net&lt;br /&gt;
 &lt;br /&gt;
 SASL_MECH       GSSAPI&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;dc=example,dc=net&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;krbldapsrv.example.net&amp;lt;/code&amp;gt; to reflect your LDAP server&#039;s DN and DNS name, respectively.  This not only points the LDAP client programs to your LDAP server by default, but it also tells them to use GSSAPI.&lt;br /&gt;
&lt;br /&gt;
=== Testing the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Log in with a KRB/LDAP user.  Get a Kerberos ticket using &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;, entering the user&#039;s password when prompted.  Next, verify that ticket exists using &amp;lt;code&amp;gt;klist&amp;lt;/code&amp;gt;.  You should then be able to access the LDAP server, for instance using the &amp;lt;code&amp;gt;ldapwhoami&amp;lt;/code&amp;gt; program.  Here&#039;s an example of this exchange:&lt;br /&gt;
&lt;br /&gt;
 openbsd$ kinit&lt;br /&gt;
 ben@EXAMPLE.NET&#039;s Password: &lt;br /&gt;
 openbsd$ klist&lt;br /&gt;
 Credentials cache: FILE:/tmp/krb5cc_10000&lt;br /&gt;
         Principal: ben@EXAMPLE.NET&lt;br /&gt;
 &lt;br /&gt;
   Issued                Expires               Principal&lt;br /&gt;
 May 15 12:57:30 2023  May 16 12:57:30 2023  krbtgt/EXAMPLE.NET@EXAMPLE.NET&lt;br /&gt;
 openbsd$ ldapwhoami&lt;br /&gt;
 SASL/GSSAPI authentication started&lt;br /&gt;
 SASL username: ben@EXAMPLE.NET&lt;br /&gt;
 SASL SSF: 56&lt;br /&gt;
 SASL data security layer installed.&lt;br /&gt;
 dn:uid=ben,ou=users,dc=example,dc=net&lt;br /&gt;
 openbsd$&lt;br /&gt;
&lt;br /&gt;
= 3. Configuring System Logins =&lt;br /&gt;
&lt;br /&gt;
The above sections allow a user to get a Kerberos ticket and use it to retrieve information from LDAP.  Now, we need to allow the system to do this so that a user can actually log in at the console or via a display manager.&lt;br /&gt;
&lt;br /&gt;
=== Kerberos Authentication ===&lt;br /&gt;
First, we need to configure the system to check passwords against Kerberos.  Edit &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; and look for the same &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt; block as in Section 1, and edit it to add the line &amp;lt;code&amp;gt;:auth=-krb5-or-pwd:\&amp;lt;/code&amp;gt; third from the bottom.  The whole block should now look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :auth=-krb5-or-pwd:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
=== LDAP Authorization ===&lt;br /&gt;
This allows the system to retrieve information from LDAP about users and groups.  OpenBSD does not directly support doing this with LDAP, but it does support network information services (NIS), and provides a bridge called &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; to interface with an LDAP server.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=69</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=69"/>
		<updated>2023-05-22T03:26:30Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Set up LDAP for authorization, so users and the system can retrieve information such as UIDs and GIDs, and group membership. &lt;br /&gt;
# Configure BSD auth so that users can log in to the system with the password for their Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
** An account/LDAP entry in the above directory server, with a host principal for the OpenBSD machine.&lt;br /&gt;
** A normal user account with an LDAP entry and Kerberos principal, that you want to be able to use to log into the OpenBSD machine.&lt;br /&gt;
** Another client machine pointing toward the Kerberos/LDAP server for troubleshooting purposes is helpful.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and the appropriate CA certificate installed on the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;/code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;br /&gt;
&lt;br /&gt;
= 2. LDAP Client =&lt;br /&gt;
&lt;br /&gt;
You probably have user-related information that you want to store centrally.  This includes not only system-related things like user and group IDs, but also other user information such as email addresses, SSH keys, phone numbers, etc.  LDAP can even be used to store things like photos, and with some scripting you have a lot of options.  Some of what is stored in LDAP should be restricted, eg the user shouldn&#039;t be able to change their UID.  On the other hand, they may need to edit something else, like their phone number.  What they can and can&#039;t edit and how to set this up is outside the scope of this document.&lt;br /&gt;
&lt;br /&gt;
This guide assumes you are authenticating the users connecting to the LDAP server.  The command line client can do this using the user&#039;s Kerberos principal using the Generic Security Services Application Programming Interface (GSSAPI).  In order to use it, you must have set up Kerberos as in the previous section.&lt;br /&gt;
&lt;br /&gt;
=== Install the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Install the LDAP client with GSSAPI support as follows:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv openldap-client&lt;br /&gt;
&lt;br /&gt;
Select the option for the package supporting GSSAPI and hit Enter.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Edit &amp;lt;code&amp;gt;/etc/openldap/openldap.conf&amp;lt;/code&amp;gt;.  The uncommented lines should look something like this:&lt;br /&gt;
&lt;br /&gt;
 BASE            dc=example,dc=net&lt;br /&gt;
 URI             ldap://krbldapsrv.example.net&lt;br /&gt;
 &lt;br /&gt;
 SASL_MECH       GSSAPI&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;dc=example,dc=net&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;krbldapsrv.example.net&amp;lt;/code&amp;gt; to reflect your LDAP server&#039;s DN and DNS name, respectively.  This not only points the LDAP client programs to your LDAP server by default, but it also tells them to use GSSAPI.&lt;br /&gt;
&lt;br /&gt;
=== Testing the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Log in with a KRB/LDAP user.  Get a Kerberos ticket using &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;, entering the user&#039;s password when prompted.  Next, verify that ticket exists using &amp;lt;code&amp;gt;klist&amp;lt;/code&amp;gt;.  You should then be able to access the LDAP server, for instance using the &amp;lt;code&amp;gt;ldapwhoami&amp;lt;/code&amp;gt; program.  Here&#039;s an example of this exchange:&lt;br /&gt;
&lt;br /&gt;
 openbsd$ kinit&lt;br /&gt;
 ben@EXAMPLE.NET&#039;s Password: &lt;br /&gt;
 openbsd$ klist&lt;br /&gt;
 Credentials cache: FILE:/tmp/krb5cc_10000&lt;br /&gt;
         Principal: ben@EXAMPLE.NET&lt;br /&gt;
 &lt;br /&gt;
   Issued                Expires               Principal&lt;br /&gt;
 May 15 12:57:30 2023  May 16 12:57:30 2023  krbtgt/EXAMPLE.NET@EXAMPLE.NET&lt;br /&gt;
 openbsd$ ldapwhoami&lt;br /&gt;
 SASL/GSSAPI authentication started&lt;br /&gt;
 SASL username: ben@EXAMPLE.NET&lt;br /&gt;
 SASL SSF: 56&lt;br /&gt;
 SASL data security layer installed.&lt;br /&gt;
 dn:uid=ben,ou=users,dc=example,dc=net&lt;br /&gt;
 openbsd$&lt;br /&gt;
&lt;br /&gt;
= 3. Configuring System Logins =&lt;br /&gt;
&lt;br /&gt;
First, we need to configure the system to check passwords against Kerberos.  Edit &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; and look for the same &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt; block as in Section 1, and edit it to add the line &amp;lt;code&amp;gt;:auth=-krb5-or-pwd:\&amp;lt;/code&amp;gt; third from the bottom.  The whole block should now look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :auth=-krb5-or-pwd:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=68</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=68"/>
		<updated>2023-05-22T03:25:34Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Set up LDAP for authorization, so users and the system can retrieve information such as UIDs and GIDs, and group membership. &lt;br /&gt;
# Configure BSD auth so that users can log in to the system with the password for their Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
** An account/LDAP entry in the above directory server, with a host principal for the OpenBSD machine.&lt;br /&gt;
** A normal user account with an LDAP entry and Kerberos principal, that you want to be able to use to log into the OpenBSD machine.&lt;br /&gt;
** Another client machine pointing toward the Kerberos/LDAP server for troubleshooting purposes is helpful.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and the appropriate CA certificate installed on the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;/code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;br /&gt;
&lt;br /&gt;
= 2. LDAP Client =&lt;br /&gt;
&lt;br /&gt;
You probably have user-related information that you want to store centrally.  This includes not only system-related things like user and group IDs, but also other user information such as email addresses, SSH keys, phone numbers, etc.  LDAP can even be used to store things like photos, and with some scripting you have a lot of options.  Some of what is stored in LDAP should be restricted, eg the user shouldn&#039;t be able to change their UID.  On the other hand, they may need to edit something else, like their phone number.  What they can and can&#039;t edit and how to set this up is outside the scope of this document.&lt;br /&gt;
&lt;br /&gt;
This guide assumes you are authenticating the users connecting to the LDAP server.  The command line client can do this using the user&#039;s Kerberos principal using the Generic Security Services Application Programming Interface (GSSAPI).  In order to use it, you must have set up Kerberos as in the previous section.&lt;br /&gt;
&lt;br /&gt;
=== Install the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Install the LDAP client with GSSAPI support as follows:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv openldap-client&lt;br /&gt;
&lt;br /&gt;
Select the option for the package supporting GSSAPI and hit Enter.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Edit &amp;lt;code&amp;gt;/etc/openldap/openldap.conf&amp;lt;/code&amp;gt;.  The uncommented lines should look something like this:&lt;br /&gt;
&lt;br /&gt;
 BASE            dc=example,dc=net&lt;br /&gt;
 URI             ldap://krbldapsrv.example.net&lt;br /&gt;
 ode&lt;br /&gt;
 SASL_MECH       GSSAPI&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;dc=example,dc=net&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;krbldapsrv.example.net&amp;lt;/code&amp;gt; to reflect your LDAP server&#039;s DN and DNS name, respectively.  This not only points the LDAP client programs to your LDAP server by default, but it also tells them to use GSSAPI.&lt;br /&gt;
&lt;br /&gt;
=== Testing the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Log in with a KRB/LDAP user.  Get a Kerberos ticket using &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;, entering the user&#039;s password when prompted.  Next, verify that ticket exists using &amp;lt;code&amp;gt;klist&amp;lt;/code&amp;gt;.  You should then be able to access the LDAP server, for instance using the &amp;lt;code&amp;gt;ldapwhoami&amp;lt;/code&amp;gt; program.  Here&#039;s an example of this exchange:&lt;br /&gt;
&lt;br /&gt;
 openbsd$ kinit&lt;br /&gt;
 ben@EXAMPLE.NET&#039;s Password: &lt;br /&gt;
 openbsd$ klist&lt;br /&gt;
 Credentials cache: FILE:/tmp/krb5cc_10000&lt;br /&gt;
         Principal: ben@EXAMPLE.NET&lt;br /&gt;
 &lt;br /&gt;
   Issued                Expires               Principal&lt;br /&gt;
 May 15 12:57:30 2023  May 16 12:57:30 2023  krbtgt/EXAMPLE.NET@EXAMPLE.NET&lt;br /&gt;
 openbsd$ ldapwhoami&lt;br /&gt;
 SASL/GSSAPI authentication started&lt;br /&gt;
 SASL username: ben@EXAMPLE.NET&lt;br /&gt;
 SASL SSF: 56&lt;br /&gt;
 SASL data security layer installed.&lt;br /&gt;
 dn:uid=ben,ou=users,dc=example,dc=net&lt;br /&gt;
 openbsd$&lt;br /&gt;
&lt;br /&gt;
= 3. Configuring System Logins =&lt;br /&gt;
&lt;br /&gt;
First, we need to configure the system to check passwords against Kerberos.  Edit &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; and look for the same &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt; block as in Section 1, and edit it to add the line &amp;lt;code&amp;gt;:auth=-krb5-or-pwd:\&amp;lt;/code&amp;gt; third from the bottom.  The whole block should now look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :auth=-krb5-or-pwd:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=67</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=67"/>
		<updated>2023-05-22T03:25:05Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Set up LDAP for authorization, so users and the system can retrieve information such as UIDs and GIDs, and group membership. &lt;br /&gt;
# Configure BSD auth so that users can log in to the system with the password for their Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
** An account/LDAP entry in the above directory server, with a host principal for the OpenBSD machine.&lt;br /&gt;
** A normal user account with an LDAP entry and Kerberos principal, that you want to be able to use to log into the OpenBSD machine.&lt;br /&gt;
** Another client machine pointing toward the Kerberos/LDAP server for troubleshooting purposes is helpful.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and the appropriate CA certificate installed on the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;/code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;br /&gt;
&lt;br /&gt;
= 2. LDAP Client =&lt;br /&gt;
&lt;br /&gt;
You probably have user-related information that you want to store centrally.  This includes not only system-related things like user and group IDs, but also other user information such as email addresses, SSH keys, phone numbers, etc.  LDAP can even be used to store things like photos, and with some scripting you have a lot of options.  Some of what is stored in LDAP should be restricted, eg the user shouldn&#039;t be able to change their UID.  On the other hand, they may need to edit something else, like their phone number.  What they can and can&#039;t edit and how to set this up is outside the scope of this document.&lt;br /&gt;
&lt;br /&gt;
This guide assumes you are authenticating the users connecting to the LDAP server.  The command line client can do this using the user&#039;s Kerberos principal using the Generic Security Services Application Programming Interface (GSSAPI).  In order to use it, you must have set up Kerberos as in the previous section.&lt;br /&gt;
&lt;br /&gt;
=== Install the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Install the LDAP client with GSSAPI support as follows:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv openldap-client&lt;br /&gt;
&lt;br /&gt;
Select the option for the package supporting GSSAPI and hit Enter.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Edit &amp;lt;code&amp;gt;/etc/openldap/openldap.conf&amp;lt;/code&amp;gt;.  The uncommented lines should look something like this:&lt;br /&gt;
&lt;br /&gt;
 BASE            dc=example,dc=net&lt;br /&gt;
 URI             ldap://krbldapsrv.example.net&lt;br /&gt;
 ode&lt;br /&gt;
 SASL_MECH       GSSAPI&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;dc=example,dc=net&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;krbldapsrv.example.net&amp;lt;/code&amp;gt; to reflect your LDAP server&#039;s DN and DNS name, respectively.  This not only points the LDAP client programs to your LDAP server by default, but it also tells them to use GSSAPI.&lt;br /&gt;
&lt;br /&gt;
=== Testing the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Log in with a KRB/LDAP user.  Get a Kerberos ticket using &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;, entering the user&#039;s password when prompted.  Next, verify that ticket exists using &amp;lt;code&amp;gt;klist&amp;lt;/code&amp;gt;.  You should then be able to access the LDAP server, for instance using the &amp;lt;code&amp;gt;ldapwhoami&amp;lt;/code&amp;gt; program.  Here&#039;s an example of this exchange:&lt;br /&gt;
&lt;br /&gt;
 openbsd$ kinit&lt;br /&gt;
 ben@EXAMPLE.NET&#039;s Password: &lt;br /&gt;
 openbsd$ klist&lt;br /&gt;
 Credentials cache: FILE:/tmp/krb5cc_10000&lt;br /&gt;
         Principal: ben@EXAMPLE.NET&lt;br /&gt;
 &lt;br /&gt;
   Issued                Expires               Principal&lt;br /&gt;
 May 15 12:57:30 2023  May 16 12:57:30 2023  krbtgt/EXAMPLE.NET@EXAMPLE.NET&lt;br /&gt;
 openbsd$ ldapwhoami&lt;br /&gt;
 SASL/GSSAPI authentication started&lt;br /&gt;
 SASL username: ben@EXAMPLE.NET&lt;br /&gt;
 SASL SSF: 56&lt;br /&gt;
 SASL data security layer installed.&lt;br /&gt;
 dn:uid=ben,ou=users,dc=example,dc=net&lt;br /&gt;
 openbsd$&lt;br /&gt;
&lt;br /&gt;
== Configuring System Login ==&lt;br /&gt;
&lt;br /&gt;
First, we need to configure the system to check passwords against Kerberos.  Edit &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; and look for the same &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt; block as in Section 1, and edit it to add the line &amp;lt;code&amp;gt;:auth=-krb5-or-pwd:\&amp;lt;/code&amp;gt; third from the bottom.  The whole block should now look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :auth=-krb5-or-pwd:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=66</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=66"/>
		<updated>2023-05-15T05:06:47Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: /* Testing the LDAP Client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Set up LDAP for authorization, so users and the system can retrieve information such as UIDs and GIDs, and group membership. &lt;br /&gt;
# Configure BSD auth so that users can log in to the system with the password for their Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
** An account/LDAP entry in the above directory server, with a host principal for the OpenBSD machine.&lt;br /&gt;
** A normal user account with an LDAP entry and Kerberos principal, that you want to be able to use to log into the OpenBSD machine.&lt;br /&gt;
** Another client machine pointing toward the Kerberos/LDAP server for troubleshooting purposes is helpful.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and the appropriate CA certificate installed on the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;/code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;br /&gt;
&lt;br /&gt;
= 2. LDAP Client =&lt;br /&gt;
&lt;br /&gt;
You probably have user-related information that you want to store centrally.  This includes not only system-related things like user and group IDs, but also other user information such as email addresses, SSH keys, phone numbers, etc.  LDAP can even be used to store things like photos, and with some scripting you have a lot of options.  Some of what is stored in LDAP should be restricted, eg the user shouldn&#039;t be able to change their UID.  On the other hand, they may need to edit something else, like their phone number.  What they can and can&#039;t edit and how to set this up is outside the scope of this document.&lt;br /&gt;
&lt;br /&gt;
This guide assumes you are authenticating the users connecting to the LDAP server.  The command line client can do this using the user&#039;s Kerberos principal using the Generic Security Services Application Programming Interface (GSSAPI).  In order to use it, you must have set up Kerberos as in the previous section.&lt;br /&gt;
&lt;br /&gt;
=== Install the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Install the LDAP client with GSSAPI support as follows:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv openldap-client&lt;br /&gt;
&lt;br /&gt;
Select the option for the package supporting GSSAPI and hit Enter.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Edit &amp;lt;code&amp;gt;/etc/openldap/openldap.conf&amp;lt;/code&amp;gt;.  The uncommented lines should look something like this:&lt;br /&gt;
&lt;br /&gt;
 BASE            dc=example,dc=net&lt;br /&gt;
 URI             ldap://krbldapsrv.example.net&lt;br /&gt;
 ode&lt;br /&gt;
 SASL_MECH       GSSAPI&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;dc=example,dc=net&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;krbldapsrv.example.net&amp;lt;/code&amp;gt; to reflect your LDAP server&#039;s DN and DNS name, respectively.  This not only points the LDAP client programs to your LDAP server by default, but it also tells them to use GSSAPI.&lt;br /&gt;
&lt;br /&gt;
=== Testing the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Log in with a KRB/LDAP user.  Get a Kerberos ticket using &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;, entering the user&#039;s password when prompted.  Next, verify that ticket exists using &amp;lt;code&amp;gt;klist&amp;lt;/code&amp;gt;.  You should then be able to access the LDAP server, for instance using the &amp;lt;code&amp;gt;ldapwhoami&amp;lt;/code&amp;gt; program.  Here&#039;s an example of this exchange:&lt;br /&gt;
&lt;br /&gt;
 openbsd$ kinit&lt;br /&gt;
 ben@EXAMPLE.NET&#039;s Password: &lt;br /&gt;
 openbsd$ klist&lt;br /&gt;
 Credentials cache: FILE:/tmp/krb5cc_10000&lt;br /&gt;
         Principal: ben@EXAMPLE.NET&lt;br /&gt;
 &lt;br /&gt;
   Issued                Expires               Principal&lt;br /&gt;
 May 15 12:57:30 2023  May 16 12:57:30 2023  krbtgt/EXAMPLE.NET@EXAMPLE.NET&lt;br /&gt;
 openbsd$ ldapwhoami&lt;br /&gt;
 SASL/GSSAPI authentication started&lt;br /&gt;
 SASL username: ben@EXAMPLE.NET&lt;br /&gt;
 SASL SSF: 56&lt;br /&gt;
 SASL data security layer installed.&lt;br /&gt;
 dn:uid=ben,ou=users,dc=example,dc=net&lt;br /&gt;
 openbsd$&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=65</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=65"/>
		<updated>2023-05-15T05:06:25Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: /* 2. LDAP Client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Set up LDAP for authorization, so users and the system can retrieve information such as UIDs and GIDs, and group membership. &lt;br /&gt;
# Configure BSD auth so that users can log in to the system with the password for their Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
** An account/LDAP entry in the above directory server, with a host principal for the OpenBSD machine.&lt;br /&gt;
** A normal user account with an LDAP entry and Kerberos principal, that you want to be able to use to log into the OpenBSD machine.&lt;br /&gt;
** Another client machine pointing toward the Kerberos/LDAP server for troubleshooting purposes is helpful.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and the appropriate CA certificate installed on the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;/code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;br /&gt;
&lt;br /&gt;
= 2. LDAP Client =&lt;br /&gt;
&lt;br /&gt;
You probably have user-related information that you want to store centrally.  This includes not only system-related things like user and group IDs, but also other user information such as email addresses, SSH keys, phone numbers, etc.  LDAP can even be used to store things like photos, and with some scripting you have a lot of options.  Some of what is stored in LDAP should be restricted, eg the user shouldn&#039;t be able to change their UID.  On the other hand, they may need to edit something else, like their phone number.  What they can and can&#039;t edit and how to set this up is outside the scope of this document.&lt;br /&gt;
&lt;br /&gt;
This guide assumes you are authenticating the users connecting to the LDAP server.  The command line client can do this using the user&#039;s Kerberos principal using the Generic Security Services Application Programming Interface (GSSAPI).  In order to use it, you must have set up Kerberos as in the previous section.&lt;br /&gt;
&lt;br /&gt;
=== Install the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Install the LDAP client with GSSAPI support as follows:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv openldap-client&lt;br /&gt;
&lt;br /&gt;
Select the option for the package supporting GSSAPI and hit Enter.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Edit &amp;lt;code&amp;gt;/etc/openldap/openldap.conf&amp;lt;/code&amp;gt;.  The uncommented lines should look something like this:&lt;br /&gt;
&lt;br /&gt;
 BASE            dc=example,dc=net&lt;br /&gt;
 URI             ldap://krbldapsrv.example.net&lt;br /&gt;
 ode&lt;br /&gt;
 SASL_MECH       GSSAPI&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;dc=example,dc=net&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;krbldapsrv.example.net&amp;lt;/code&amp;gt; to reflect your LDAP server&#039;s DN and DNS name, respectively.  This not only points the LDAP client programs to your LDAP server by default, but it also tells them to use GSSAPI.&lt;br /&gt;
&lt;br /&gt;
=== Testing the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Log in with a KRB/LDAP user.  Get a Kerberos ticket using &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;, entering the user&#039;s password when prompted.  Next, verify that ticket exists using &amp;lt;code&amp;gt;klist&amp;lt;/code&amp;gt;.  You should then be able to access the LDAP server, for instance using the &amp;lt;code&amp;gt;ldapwhoami&amp;lt;/code&amp;gt; program.  Here&#039;s an example of this exchange:&lt;br /&gt;
&lt;br /&gt;
 openbsd$ kinit&lt;br /&gt;
 ben@EXAMPLE.NET&#039;s Password: &lt;br /&gt;
 openbsd$ klist&lt;br /&gt;
 Credentials cache: FILE:/tmp/krb5cc_10000&lt;br /&gt;
         Principal: ben@EXAMPLE.NET&lt;br /&gt;
 &lt;br /&gt;
   Issued                Expires               Principal&lt;br /&gt;
 May 15 12:57:30 2023  May 17 12:57:30 2023  krbtgt/EXAMPLE.NET@EXAMPLE.NET&lt;br /&gt;
 openbsd$ ldapwhoami&lt;br /&gt;
 SASL/GSSAPI authentication started&lt;br /&gt;
 SASL username: ben@EXAMPLE.NET&lt;br /&gt;
 SASL SSF: 56&lt;br /&gt;
 SASL data security layer installed.&lt;br /&gt;
 dn:uid=ben,ou=users,dc=example,dc=net&lt;br /&gt;
 openbsd$&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=64</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=64"/>
		<updated>2023-05-15T04:57:18Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Set up LDAP for authorization, so users and the system can retrieve information such as UIDs and GIDs, and group membership. &lt;br /&gt;
# Configure BSD auth so that users can log in to the system with the password for their Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
** An account/LDAP entry in the above directory server, with a host principal for the OpenBSD machine.&lt;br /&gt;
** A normal user account with an LDAP entry and Kerberos principal, that you want to be able to use to log into the OpenBSD machine.&lt;br /&gt;
** Another client machine pointing toward the Kerberos/LDAP server for troubleshooting purposes is helpful.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and the appropriate CA certificate installed on the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;/code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;br /&gt;
&lt;br /&gt;
= 2. LDAP Client =&lt;br /&gt;
&lt;br /&gt;
You probably have user-related information that you want to store centrally.  This includes not only system-related things like user and group IDs, but also other user information such as email addresses, SSH keys, phone numbers, etc.  LDAP can even be used to store things like photos, and with some scripting you have a lot of options.  Some of what is stored in LDAP should be restricted, eg the user shouldn&#039;t be able to change their UID.  On the other hand, they may need to edit something else, like their phone number.  What they can and can&#039;t edit and how to set this up is outside the scope of this document.&lt;br /&gt;
&lt;br /&gt;
This guide assumes you are authenticating the users connecting to the LDAP server.  The command line client can do this using the user&#039;s Kerberos principal using the Generic Security Services Application Programming Interface (GSSAPI).  In order to use it, you must have set up Kerberos as in the previous section.&lt;br /&gt;
&lt;br /&gt;
=== Install the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Install the LDAP client with GSSAPI support as follows:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv openldap-client&lt;br /&gt;
&lt;br /&gt;
Select the option for the package supporting GSSAPI and hit Enter.  Next, edit &amp;lt;code&amp;gt;/etc/openldap/openldap.conf&amp;lt;/code&amp;gt;.  The uncommented lines should look something like this:&lt;br /&gt;
&lt;br /&gt;
 BASE            dc=example,dc=net&lt;br /&gt;
 URI             ldap://krbldapsrv.example.net&lt;br /&gt;
 &lt;br /&gt;
 SASL_MECH       GSSAPI&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;dc=example,dc=net&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;krbldapsrv.example.net&amp;lt;/code&amp;gt; to reflect your LDAP server&#039;s DN and DNS name, respectively&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=63</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=63"/>
		<updated>2023-05-15T04:55:43Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: /* 2. LDAP Client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Set up LDAP for authorization, so users and the system can retrieve information such as UIDs and GIDs, and group membership. &lt;br /&gt;
# Configure BSD auth so that users can log in to the system with the password for their Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
** An account/LDAP entry in the above directory server, with a host principal for the OpenBSD machine.&lt;br /&gt;
** A normal user account with an LDAP entry and Kerberos principal, that you want to be able to use to log into the OpenBSD machine.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and a client certificate for the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;/code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;br /&gt;
&lt;br /&gt;
= 2. LDAP Client =&lt;br /&gt;
&lt;br /&gt;
You probably have user-related information that you want to store centrally.  This includes not only system-related things like user and group IDs, but also other user information such as email addresses, SSH keys, phone numbers, etc.  LDAP can even be used to store things like photos, and with some scripting you have a lot of options.  Some of what is stored in LDAP should be restricted, eg the user shouldn&#039;t be able to change their UID.  On the other hand, they may need to edit something else, like their phone number.  What they can and can&#039;t edit and how to set this up is outside the scope of this document.&lt;br /&gt;
&lt;br /&gt;
This guide assumes you are authenticating the users connecting to the LDAP server.  The command line client can do this using the user&#039;s Kerberos principal using the Generic Security Services Application Programming Interface (GSSAPI).  In order to use it, you must have set up Kerberos as in the previous section.&lt;br /&gt;
&lt;br /&gt;
=== Install the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Install the LDAP client with GSSAPI support as follows:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv openldap-client&lt;br /&gt;
&lt;br /&gt;
Select the option for the package supporting GSSAPI and hit Enter.  Next, edit &amp;lt;code&amp;gt;/etc/openldap/openldap.conf&amp;lt;/code&amp;gt;.  The uncommented lines should look something like this:&lt;br /&gt;
&lt;br /&gt;
 BASE            dc=example,dc=net&lt;br /&gt;
 URI             ldap://krbldapsrv.example.net&lt;br /&gt;
 &lt;br /&gt;
 SASL_MECH       GSSAPI&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;dc=example,dc=net&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;krbldapsrv.example.net&amp;lt;/code&amp;gt; to reflect your LDAP server&#039;s DN and DNS name, respectively&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=62</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=62"/>
		<updated>2023-05-12T04:23:32Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: /* 2. LDAP Client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Set up LDAP for authorization, so users and the system can retrieve information such as UIDs and GIDs, and group membership. &lt;br /&gt;
# Configure BSD auth so that users can log in to the system with the password for their Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
** An account/LDAP entry in the above directory server, with a host principal for the OpenBSD machine.&lt;br /&gt;
** A normal user account with an LDAP entry and Kerberos principal, that you want to be able to use to log into the OpenBSD machine.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and a client certificate for the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;/code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;br /&gt;
&lt;br /&gt;
= 2. LDAP Client =&lt;br /&gt;
&lt;br /&gt;
You probably have user-related information that you want to store centrally.  This includes not only system-related things like user and group IDs, but also other user information such as email addresses, SSH keys, phone numbers, etc.  LDAP can even be used to store things like photos, and with some scripting you have a lot of options.  Some of what is stored in LDAP should be restricted, eg the user shouldn&#039;t be able to change their UID.  On the other hand, they may need to edit something else, like their phone number.  What they can and can&#039;t edit and how to set this up is outside the scope of this document.&lt;br /&gt;
&lt;br /&gt;
This guide assumes you are authenticating the users connecting to the LDAP server.  The command line client can do this using the user&#039;s Kerberos principal using the Generic Security Services Application Programming Interface (GSSAPI).  In order to use it, you must have set up Kerberos as in the previous section.&lt;br /&gt;
&lt;br /&gt;
=== Install the LDAP Client ===&lt;br /&gt;
&lt;br /&gt;
Install the LDAP client with GSSAPI support as follows:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=61</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=61"/>
		<updated>2023-05-12T04:16:42Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: /* 2. LDAP Client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Set up LDAP for authorization, so users and the system can retrieve information such as UIDs and GIDs, and group membership. &lt;br /&gt;
# Configure BSD auth so that users can log in to the system with the password for their Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
** An account/LDAP entry in the above directory server, with a host principal for the OpenBSD machine.&lt;br /&gt;
** A normal user account with an LDAP entry and Kerberos principal, that you want to be able to use to log into the OpenBSD machine.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and a client certificate for the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;/code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;br /&gt;
&lt;br /&gt;
= 2. LDAP Client =&lt;br /&gt;
&lt;br /&gt;
Usually, on a Unix-like system, authorization information would be stored in the files &amp;lt;code&amp;gt;/etc/passwd&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/etc/group&amp;lt;/code&amp;gt;.  In this case, we want to pull this information from our LDAP server.  Depending on your setup, there may be other information stored in LDAP as well, such as email addresses or SSH keys.  This means that there needs to be a way for the system itself to access the directory, as well as normal users through the LDAP command line clients.&lt;br /&gt;
&lt;br /&gt;
This guide assumes you are authenticating the users connecting to the LDAP server.  The command line client can do this using the user&#039;s Kerberos principal using the Generic Security Services Application Programming Interface (GSSAPI).  For authorization, OpenBSD uses the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; daemon, which acts as a translation layer between Network Information Service (NIS) and an LDAP server.  This does not support GSSAPI.&lt;br /&gt;
&lt;br /&gt;
The first task will be to&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=60</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=60"/>
		<updated>2023-05-12T04:09:25Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Set up LDAP for authorization, so users and the system can retrieve information such as UIDs and GIDs, and group membership. &lt;br /&gt;
# Configure BSD auth so that users can log in to the system with the password for their Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
** An account/LDAP entry in the above directory server, with a host principal for the OpenBSD machine.&lt;br /&gt;
** A normal user account with an LDAP entry and Kerberos principal, that you want to be able to use to log into the OpenBSD machine.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and a client certificate for the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;/code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;br /&gt;
&lt;br /&gt;
= 2. LDAP Client =&lt;br /&gt;
&lt;br /&gt;
Usually, on a Unix-like system, user and group information would be stored in the files &amp;lt;code&amp;gt;/etc/passwd&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/etc/group&amp;lt;/code&amp;gt;.  In this case, we want to pull this information from our LDAP server.  Depending on your setup, there may be other information stored in LDAP as well, such as email addresses or SSH keys.  This means that there needs to be a way for the system itself to access the directory, as well as normal users through the LDAP command line clients.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=59</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=59"/>
		<updated>2023-05-12T03:59:07Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Set up LDAP for authorization, so users and the system can retrieve information such as UIDs and GIDs, and group membership. &lt;br /&gt;
# Configure BSD auth so that users can log in to the system with the password for their Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
** An account/LDAP entry in the above directory server, with a host principal for the OpenBSD machine.&lt;br /&gt;
** A normal user account with an LDAP entry and Kerberos principal, that you want to be able to use to log into the OpenBSD machine.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and a client certificate for the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;/code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=58</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=58"/>
		<updated>2023-05-12T03:57:44Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Configure BSD auth so that users can log in with the password for their Kerberos principal.&lt;br /&gt;
# Set up LDAP for authorization, so users and the system can retrieve information such as UIDs and GIDs, and group membership. &lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
** An account/LDAP entry in the above directory server, with a host principal for the OpenBSD machine.&lt;br /&gt;
** A normal user account with an LDAP entry and Kerberos principal, that you want to be able to use to log into the OpenBSD machine.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and a client certificate for the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;/code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=57</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=57"/>
		<updated>2023-05-12T03:57:17Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Configure BSD auth so that users can log in with the password for their Kerberos principal.&lt;br /&gt;
# Set up LDAP for authorization, so both users and the system can retrieve information such as UIDs and GIDs, and group membership.  Requires setting up &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; as well as LDAP clients with GSSAPI.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
** An account/LDAP entry in the above directory server, with a host principal for the OpenBSD machine.&lt;br /&gt;
** A normal user account with an LDAP entry and Kerberos principal, that you want to be able to use to log into the OpenBSD machine.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and a client certificate for the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;/code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=56</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=56"/>
		<updated>2023-05-12T03:54:38Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Configure BSD auth so that users can log in with the password for their Kerberos principal.&lt;br /&gt;
# Configure &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; so that the system can get information about network users, ie what their user ID and group ID numbers are.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
** An account/LDAP entry in the above directory server, with a host principal for the OpenBSD machine.&lt;br /&gt;
** A normal user account with an LDAP entry and Kerberos principal, that you want to be able to use to log into the OpenBSD machine.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and a client certificate for the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;/code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=55</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=55"/>
		<updated>2023-05-04T07:17:57Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: /* 1. Kerberos Client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Configure BSD auth so that users can log in with the password for their Kerberos principal.&lt;br /&gt;
# Configure &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; so that the system can get information about network users, ie what their user ID and group ID numbers are.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and a client certificate for the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
 &lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;/code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=54</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=54"/>
		<updated>2023-05-04T07:16:47Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: /* 1. Kerberos Client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Configure BSD auth so that users can log in with the password for their Kerberos principal.&lt;br /&gt;
# Configure &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; so that the system can get information about network users, ie what their user ID and group ID numbers are.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and a client certificate for the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
 &lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  Install the following packages:&lt;br /&gt;
&lt;br /&gt;
 openbsd# pkg_add -iv heimdal heimdal-libs&lt;br /&gt;
&lt;br /&gt;
You should now have the packages installed - check to make sure you have the appropriate directory:&lt;br /&gt;
&lt;br /&gt;
 openbsd# ls /usr/local/heimdal&lt;br /&gt;
&lt;br /&gt;
That directory should exist and have folders in it.  Next, to add it to the path, open &amp;lt;code&amp;gt;/etc/login.conf&amp;lt;/code&amp;gt; in a text editor, and look for the default block (begins with &amp;lt;code&amp;gt;default:\&amp;lt;/code&amp;gt;).  Add &amp;lt;code&amp;gt;/usr/local/heimdal/bin&amp;lt;code&amp;gt; to the path, so that at this point the block should look like this:&lt;br /&gt;
&lt;br /&gt;
 default:\&lt;br /&gt;
         :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin /usr/local/heimdal/bin:\&lt;br /&gt;
         :umask=022:\&lt;br /&gt;
         :datasize-max=1024M:\&lt;br /&gt;
         :datasize-cur=1024M:\&lt;br /&gt;
         :maxproc-max=256:\&lt;br /&gt;
         :maxproc-cur=128:\&lt;br /&gt;
         :openfiles-max=1024:\&lt;br /&gt;
         :openfiles-cur=512:\&lt;br /&gt;
         :stacksize-cur=4M:\&lt;br /&gt;
         :localcipher=blowfish,a:\&lt;br /&gt;
         :tc=auth-defaults:\&lt;br /&gt;
         :tc=auth-ftp-defaults:&lt;br /&gt;
&lt;br /&gt;
Next, to ensure that OpenBSD relinks the libraries on boot, add the following line to &amp;lt;code&amp;gt;/etc/rc.conf.local&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 shlib_dirs=/usr/local/heimdal/lib&lt;br /&gt;
&lt;br /&gt;
At this point, a user should be able to log in and run the &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt; - in other words, it&#039;s in their path.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=53</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=53"/>
		<updated>2023-05-04T07:03:12Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: /* Limitations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Configure BSD auth so that users can log in with the password for their Kerberos principal.&lt;br /&gt;
# Configure &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; so that the system can get information about network users, ie what their user ID and group ID numbers are.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and a client certificate for the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
 &lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the Heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
In my setup, I use MIT Kerberos for the KDC.  You can still get a ticket from a Heimdal client, but the protocols for administration (used by the &amp;lt;code&amp;gt;kadmin&amp;lt;/code&amp;gt; command) are different between the two.  This means that certain things, eg getting a host principal have to be done manually.  &lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  OpenBSD has packages for Heimdal Kerberos,&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=52</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=52"/>
		<updated>2023-05-04T07:01:01Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: /* 1. Kerberos Client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Configure BSD auth so that users can log in with the password for their Kerberos principal.&lt;br /&gt;
# Configure &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; so that the system can get information about network users, ie what their user ID and group ID numbers are.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and a client certificate for the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
 &lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.  OpenBSD has packages for Heimdal Kerberos,&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=51</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=51"/>
		<updated>2023-05-04T06:59:34Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This is useful for a couple reasons.  Obviously, being able to use the same password across different hosts is handy, as is single sign-on.  However, keeping UIDs/GIDs in sync is nice as well, when it comes to things like removeable media and NFS shares - it ensures that &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is always &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; on every host.  Of course, you also have LDAP available, and all that entails.  This makes it possible to store other information about a user (or group or host), depending on what you want to accomplish.  You can, for instance, store SSH keys this way.&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Configure BSD auth so that users can log in with the password for their Kerberos principal.&lt;br /&gt;
# Configure &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; so that the system can get information about network users, ie what their user ID and group ID numbers are.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and a client certificate for the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
 &lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=50</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=50"/>
		<updated>2023-04-30T02:42:27Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Configure BSD auth so that users can log in with the password for their Kerberos principal.&lt;br /&gt;
# Configure &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; so that the system can get information about network users, ie what their user ID and group ID numbers are.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and a client certificate for the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.  I recommend having a local user set up as well.  (Created during the install process, for instance.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This assumes you have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD is of course helpful as well. :)&lt;br /&gt;
 &lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so by default you cannot log in to a the OpenBSD client from another machine using just a Kerberos principal.&lt;br /&gt;
&lt;br /&gt;
OpenBSD provides LDAP-based authorization (ie, info about the user such as their user and group, as opposed to authenticating them by their password) via the &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; program.  This does not support GSSAPI, meaning that communication to the LDAP server won&#039;t be encrypted.  We get around this by using an SSL certificate.&lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to configure the Kerberos client programs - a user on the OpenBSD machine should be able to get a ticket by running &amp;lt;code&amp;gt;kinit&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=49</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=49"/>
		<updated>2023-04-30T02:13:10Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A client host in a Kerberos/LDAP environment will do a couple things.  First, the user should be able to log in using the password on their Kerberos principal - ideally, if coming from another host in the Kerberos realm with an existing ticket, they wouldn&#039;t need a password.  (At this time, this is not possible per this guide, see the Limitations section below.)  At this point, they&#039;re authenticated as a normal user of the host, and have a UID/GID that the host knows about via LDAP.  At the same time, the user should be able to acquire their own Kerberos ticket, to log onto other hosts.&lt;br /&gt;
&lt;br /&gt;
To do this, there are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Configure BSD auth so that users can log in with the password for their Kerberos principal.&lt;br /&gt;
# Configure &amp;lt;code&amp;gt;ypldap&amp;lt;/code&amp;gt; so that the system can get information about network users, ie what their user ID and group ID numbers are.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
* The LDAP server configured with an SSL server certificate, and a client certificate for the OpenBSD machine.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.&lt;br /&gt;
&lt;br /&gt;
You should have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD itself is helpful too. :)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so single sign on is not possible by default.  &lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=48</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=48"/>
		<updated>2023-04-28T05:29:04Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
A host acting as a client in a Kerberos/LDAP environment will likely have a &lt;br /&gt;
&lt;br /&gt;
There are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Configure BSD auth so that users can log in with the password for their Kerberos principal.&lt;br /&gt;
# Configure ypldap so that the system can get information about network users, ie what their user ID and group ID numbers are.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.&lt;br /&gt;
&lt;br /&gt;
You should have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD itself is helpful too. :)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so single sign on is not possible by default.  &lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=47</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=47"/>
		<updated>2023-04-28T04:54:15Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
There are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Configure BSD auth so that users can log in with the password for their Kerberos principal.&lt;br /&gt;
# Configure ypldap so that the system can get information about network users, ie what their user ID and group ID numbers are.&lt;br /&gt;
&lt;br /&gt;
A user should be able to log into the system with the password set up with their Kerberos principal.  The system should be able to look in LDAP to get user information, and using Kerberos and GSSAPI, search through the LDAP directory and make changes to things they have permission for. &lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
* An up-to-date OpenBSD system you want to set up as a client, with root access.&lt;br /&gt;
&lt;br /&gt;
You should have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD itself is helpful too. :)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so single sign on is not possible by default.  &lt;br /&gt;
&lt;br /&gt;
= 1. Kerberos Client =&lt;br /&gt;
&lt;br /&gt;
The first step is to&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Main_Page&amp;diff=46</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Main_Page&amp;diff=46"/>
		<updated>2023-04-28T04:42:28Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the Unixcat.net wiki.  Here you will find different articles and pages that I don&#039;t feel fit into the [https://blog.unixcat.net blog] format.  These include things like how-tos, descriptions of projects, and other pages I&#039;m not publishing in chronological order.&lt;br /&gt;
&lt;br /&gt;
Note that at some point in the future, this may disappear if I decide to present it all in some other way.  For now, though, wiki it is.&lt;br /&gt;
&lt;br /&gt;
=== Some Categories to Check Out ===&lt;br /&gt;
&lt;br /&gt;
[[:Category:Desktop Linux]]&lt;br /&gt;
&lt;br /&gt;
Not just GNU/Linux.  Tips, tricks, notes, etc. on using *nix systems on the desktop.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=45</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=45"/>
		<updated>2023-04-14T21:05:36Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
* An up-to-date OpenBSD system, with root access.&lt;br /&gt;
&lt;br /&gt;
You should have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD itself is helpful too. :)&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
There are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Configure BSD auth so that users can log in with the password for their Kerberos principal.&lt;br /&gt;
# Configure ypldap so that the system can get information about network users, ie what their user ID and group ID numbers are.&lt;br /&gt;
&lt;br /&gt;
A user should be able to log into the system with the password set up with their Kerberos principal.  The system should be able to look in LDAP to get user information, and using Kerberos and GSSAPI, search through the LDAP directory and make changes to things they have permission for.  &lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
There are some things to be aware of in this configuration.  OpenBSD removed Kerberos (the heimdal package) from the base years ago, but you can still install it with pkg_add.  System integration with Kerberos is not very strong, and presently I haven&#039;t been able to acquire a ticket automatically on log in - this is something I&#039;m looking into.  Additionally, OpenSSH is compiled without GSSAPI support, so single sign on is not possible.  This is unfortunate,&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=44</id>
		<title>Kerberos and LDAP Client on OpenBSD 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Kerberos_and_LDAP_Client_on_OpenBSD_7.3&amp;diff=44"/>
		<updated>2023-04-14T20:48:44Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: Created page with &amp;quot;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate agai...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kerberos and LDAP are often used to centralize authentication and authorization respectively on Unix-like systems.  Kerberos allows users and applications to authenticate against a network database (the key distribution center (KDC)), and LDAP lets you store information about things like users and groups and more.  With one or more (hopefully more, for redundancy) Kerberos and LDAP servers, it should be possible to set up client hosts such that a user created on the server can log into the client host, without a local user account.  (Local users can still be used if needed, eg as a backup or for system services.)&lt;br /&gt;
&lt;br /&gt;
This guide describes setting up OpenBSD, specifically OpenBSD 7.3 to authenticate in this way.  Note that due to Kerberos being removed from the OpenBSD base system, integration is not as tight as perhaps in other operating systems, such as Linux distributions or FreeBSD.  Note also that while this authentication scheme is similar to that used for Microsoft&#039;s Active Directory, this guide is not specifically about integrating it with OpenBSD.  If you are trying to do that, however, this may be helpful.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
In addition to an OpenBSD 7.3 host you want to actually set this up on, we will assume you have a few things available:&lt;br /&gt;
&lt;br /&gt;
* A working Kerberos KDC and LDAP directory server you can make changes to, eg creating users and principals.&lt;br /&gt;
* An up-to-date OpenBSD system, with root access.&lt;br /&gt;
&lt;br /&gt;
You should have knowledge about Kerberos and LDAP; setting them up is a subject of another guide.  Knowledge of OpenBSD itself is helpful too. :)&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
There are three primary goals:&lt;br /&gt;
&lt;br /&gt;
# Configure Kerberos on OpenBSD to point to a KDC, so a user can request and destroy a ticket.&lt;br /&gt;
# Configure BSD auth so that users can log in with the password for their Kerberos principal.&lt;br /&gt;
# Configure ypldap so that the system can get information about network users, ie what their user ID and group ID numbers are.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Syncthing_Server&amp;diff=43</id>
		<title>Syncthing Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Syncthing_Server&amp;diff=43"/>
		<updated>2020-09-12T20:07:13Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://syncthing.net/ Syncthing] is a tool written in Go to keep files synchronised between computers.  It&#039;s decentralized, meaning instead of syncing to a server, your computers can find each other on the network and sync amongst themselves.  While I don&#039;t use it outside of my home network, it can run over the internet as well - it uses relay and discovery severs, and can even traverse NAT.  &lt;br /&gt;
&lt;br /&gt;
Prior to Syncthing, I used [https://nextcloud.com/ NextCloud], which runs on a web server.  I used this to keep some directories on several computers in my home network synchronized.  It worked, and I actually still have an install I point my phone too (although Syncthing has an Android app as well).  However, sometimes it would be slow, particularly with a lot of small files.  The server also stores all of its files in its own directory, and depends on a database (I have used both MariaDB and SQLite), as opposed to Syncthing which is just its own executable.&lt;br /&gt;
&lt;br /&gt;
One advantage of the central model NextCloud uses is that if you only have one of the computers you&#039;re syncing online, it can still keep the copy of the server up to date.  While Syncthing can deal with conflicts (by renaming the conflicting files), it&#039;s nice to not have to have both machines on for them to sync in all cases.  (Although again, Syncthing can sync the two if only the two of them are online; NextCloud would still need to talk to its server.)  I had already had a machine running with an external hard drive as kind of a stopgap NAS, so I looked into how to get Syncthing going on this as well.&lt;br /&gt;
&lt;br /&gt;
== Syncthing on a Headless Server ==&lt;br /&gt;
&lt;br /&gt;
Syncthing can run just fine on a headless machine, with a caveat - each user requires a running instance.  (This is the case as far as I know, I don&#039;t know if a multiuser version is in the works at the moment.)  Also, on my laptops and desktop, I start it with my desktop environment, whereas my server doesn&#039;t have a GUI installed.  I&#039;d like it to start up on boot, but running as my user.&lt;br /&gt;
&lt;br /&gt;
I&#039;m running this on Debian 10 on a single board computer (PC Engines Alix, an i386 board), but it should work on a Raspberry Pi as well.  In fact, with a Pi 3 or 4, it would probably run better.&lt;br /&gt;
&lt;br /&gt;
=== Configuring Syncthing ===&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to actually configure Syncthing.  This is based on the [https://docs.syncthing.net/intro/getting-started.html Getting Started] page in the docs, which covers things pretty well.  However, since this is a headless server, you can use SSH to forward the GUI to your local machine:&lt;br /&gt;
&lt;br /&gt;
 ssh -L 7000:localhost:8384 servername&lt;br /&gt;
&lt;br /&gt;
That forwards the GUI, which is running on port 8384 on the server, to port 7000 on your local machine.  I chose port 7000 since I was already running Syncthing on my local machine.  When you log in just run &amp;lt;code&amp;gt;syncthing&amp;lt;/code&amp;gt; at the command line to get it started.  Then, in a web browser, just connect to &amp;lt;code&amp;gt;http://localhost:7000&amp;lt;/code&amp;gt; on your machine.  Reconfiguring Syncthing to listen to the whole network and not just on localhost is another option, but a little less secure.  I recommend setting up a username and password for the GUI, even if you only have it listen on localhost.&lt;br /&gt;
&lt;br /&gt;
If you have multiple users who want to sync on your server, they&#039;ll each need their own instance.  In that case, change the GUI port each listens on so there are no conflicts.&lt;br /&gt;
&lt;br /&gt;
Starting it for the first time gets the initial configuration going.  Before configuring any shared folders I set it up to autostart (next section), otherwise you need to leave Syncthing running in your SSH session.  After you start it and confirm you can connect, hit &amp;lt;code&amp;gt;Ctrl C&amp;lt;/code&amp;gt; in the terminal to stop the server and move on.  &lt;br /&gt;
&lt;br /&gt;
=== Starting the Server ===&lt;br /&gt;
&lt;br /&gt;
These instructions are from the [https://docs.syncthing.net/users/autostart.html#linux Syncthing documentation] for autostarting on Linux.  Basically, I&#039;m using a systemd unit file to start as a normal user.  There should be one with syncthing when you installed it; I found it in &amp;lt;code&amp;gt;/usr/lib/systemd/user/&amp;lt;/code&amp;gt;.  Copy it to your home directory like this, where &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is your username:&lt;br /&gt;
&lt;br /&gt;
 cp /usr/lib/systemd/user/syncthing.service /home/user/.config/systemd/user/&lt;br /&gt;
&lt;br /&gt;
Next, as a normal user, run these commands to enable the service on boot and start it immediately:&lt;br /&gt;
&lt;br /&gt;
 systemctl enable syncthing@user.service&lt;br /&gt;
 systemctl start syncthing@user.service&lt;br /&gt;
&lt;br /&gt;
You can confirm that it&#039;s running by either using &amp;lt;code&amp;gt;ps&amp;lt;/&amp;gt; or using &amp;lt;code&amp;gt;systemctl&amp;lt;/code&amp;gt; like this:&lt;br /&gt;
&lt;br /&gt;
 systemctl --user status syncthing.service&lt;br /&gt;
&lt;br /&gt;
At this point Syncthing should start as your user on boot.  When this is configured, SSH in as above and set up folders to sync.  In the case of the NAS, I chose to locate the synced folders on an external hard drive, and not my home directory (which is on a CF card).  On my desktop and laptops, the synced folders are all in my home directory.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Syncthing_Server&amp;diff=42</id>
		<title>Syncthing Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Syncthing_Server&amp;diff=42"/>
		<updated>2020-09-12T20:00:08Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://syncthing.net/ Syncthing] is a tool written in Go to keep files synchronised between computers.  It&#039;s decentralized, meaning instead of syncing to a server, your computers can find each other on the network and sync amongst themselves.  While I don&#039;t use it outside of my home network, it can run over the internet as well - it uses relay and discovery severs, and can even traverse NAT.  &lt;br /&gt;
&lt;br /&gt;
Prior to Syncthing, I used [https://nextcloud.com/ NextCloud], which runs on a web server.  I used this to keep some directories on several computers in my home network synchronized.  It worked, and I actually still have an install I point my phone too (although Syncthing has an Android app as well).  However, sometimes it would be slow, particularly with a lot of small files.  The server also stores all of its files in its own directory, and depends on a database (I have used both MariaDB and SQLite), as opposed to Syncthing which is just its own executable.&lt;br /&gt;
&lt;br /&gt;
One advantage of the central model NextCloud uses is that if you only have one of the computers you&#039;re syncing online, it can still keep the copy of the server up to date.  While Syncthing can deal with conflicts (by renaming the conflicting files), it&#039;s nice to not have to have both machines on for them to sync in all cases.  (Although again, Syncthing can sync the two if only the two of them are online; NextCloud would still need to talk to its server.)  I had already had a machine running with an external hard drive as kind of a stopgap NAS, so I looked into how to get Syncthing going on this as well.&lt;br /&gt;
&lt;br /&gt;
== Syncthing on a Headless Server ==&lt;br /&gt;
&lt;br /&gt;
Syncthing can run just fine on a headless machine, with a caveat - each user requires a running instance.  (This is the case as far as I know, I don&#039;t know if a multiuser version is in the works at the moment.)  Also, on my laptops and desktop, I start it with my desktop environment, whereas my server doesn&#039;t have a GUI installed.  I&#039;d like it to start up on boot, but running as my user.&lt;br /&gt;
&lt;br /&gt;
I&#039;m running this on Debian 10 on a single board computer (PC Engines Alix, an i386 board), but it should work on a Raspberry Pi as well.  In fact, with a Pi 3 or 4, it would probably run better.&lt;br /&gt;
&lt;br /&gt;
=== Configuring Syncthing ===&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to actually configure Syncthing.  This is based on the [https://docs.syncthing.net/intro/getting-started.html Getting Started] page in the docs, which covers things pretty well.  However, since this is a headless server, you can use SSH to forward the GUI to your local machine:&lt;br /&gt;
&lt;br /&gt;
 ssh -L 7000:localhost:8384 servername&lt;br /&gt;
&lt;br /&gt;
That forwards the GUI, which is running on port 8384 on the server, to port 7000 on your local machine.  I chose port 7000 since I was already running Syncthing on my local machine.  When you log in just run &amp;lt;code&amp;gt;syncthing&amp;lt;/code&amp;gt; at the command line to get it started.  Then, in a web browser, just connect to &amp;lt;code&amp;gt;http://localhost:7000&amp;lt;/code&amp;gt; on your machine.  Reconfiguring Syncthing to listen to the whole network and not just on localhost is another option, but a little less secure.&lt;br /&gt;
&lt;br /&gt;
I configured the directories to sync to point to an external hard drive; on my laptops and desktop I just have the folders in my home directory.  From then on, directories on your computers should sync as long as you allow them to be shared in the GUI; make sure the Folder IDs are the same.&lt;br /&gt;
&lt;br /&gt;
=== Starting the Server ===&lt;br /&gt;
&lt;br /&gt;
These instructions are from the [https://docs.syncthing.net/users/autostart.html#linux Syncthing documentation] for autostarting on Linux.  Basically, I&#039;m using a systemd unit file to start as a normal user.  There should be one with syncthing when you installed it; I found it in &amp;lt;code&amp;gt;/usr/lib/systemd/user/&amp;lt;/code&amp;gt;.  Copy it to your home directory like this, where &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is your username:&lt;br /&gt;
&lt;br /&gt;
 cp /usr/lib/systemd/user/syncthing.service /home/user/.config/systemd/user/&lt;br /&gt;
&lt;br /&gt;
Next, as a normal user, run these commands to enable the service on boot and start it immediately:&lt;br /&gt;
&lt;br /&gt;
 systemctl enable syncthing@user.service&lt;br /&gt;
 systemctl start syncthing@user.service&lt;br /&gt;
&lt;br /&gt;
You can confirm that it&#039;s running by either using &amp;lt;code&amp;gt;ps&amp;lt;/&amp;gt; or using &amp;lt;code&amp;gt;systemctl&amp;lt;/code&amp;gt; like this:&lt;br /&gt;
&lt;br /&gt;
 systemctl --user status syncthing.service&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Syncthing_Server&amp;diff=41</id>
		<title>Syncthing Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Syncthing_Server&amp;diff=41"/>
		<updated>2020-09-12T19:43:27Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://syncthing.net/ Syncthing] is a tool written in Go to keep files synchronised between computers.  It&#039;s decentralized, meaning instead of syncing to a server, your computers can find each other on the network and sync amongst themselves.  While I don&#039;t use it outside of my home network, it can run over the internet as well - it uses relay and discovery severs, and can even traverse NAT.  &lt;br /&gt;
&lt;br /&gt;
Prior to Syncthing, I used [https://nextcloud.com/ NextCloud], which runs on a web server.  I used this to keep some directories on several computers in my home network synchronized.  It worked, and I actually still have an install I point my phone too (although Syncthing has an Android app as well).  However, sometimes it would be slow, particularly with a lot of small files.  The server also stores all of its files in its own directory, and depends on a database (I have used both MariaDB and SQLite), as opposed to Syncthing which is just its own executable.&lt;br /&gt;
&lt;br /&gt;
One advantage of the central model NextCloud uses is that if you only have one of the computers you&#039;re syncing online, it can still keep the copy of the server up to date.  While Syncthing can deal with conflicts (by renaming the conflicting files), it&#039;s nice to not have to have both machines on for them to sync in all cases.  (Although again, Syncthing can sync the two if only the two of them are online; NextCloud would still need to talk to its server.)  I had already had a machine running with an external hard drive as kind of a stopgap NAS, so I looked into how to get Syncthing going on this as well.&lt;br /&gt;
&lt;br /&gt;
== Syncthing on a Headless Server ==&lt;br /&gt;
&lt;br /&gt;
Syncthing can run just fine on a headless machine, with a caveat - each user requires a running instance.  (This is the case as far as I know, I don&#039;t know if a multiuser version is in the works at the moment.)  Also, on my laptops and desktop, I start it with my desktop environment, whereas my server doesn&#039;t have a GUI installed.  I&#039;d like it to start up on boot, but running as my user.&lt;br /&gt;
&lt;br /&gt;
These instructions are from the [https://docs.syncthing.net/users/autostart.html#linux Syncthing documentation] for autostarting on Linux.  I&#039;m running this on Debian 10 on a single board computer (PC Engines Alix, an i386 board), but it should work on a Raspberry Pi as well.  In fact, with a Pi 3 or 4, it would probably run better.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to actually configure Syncthing.  This is based on the [https://docs.syncthing.net/intro/getting-started.html Getting Started] page in the docs, which covers things pretty well.  However, since this is a headless server, you can use SSH to forward the GUI to your local machine:&lt;br /&gt;
&lt;br /&gt;
 ssh -L 7000:localhost:8384 servername&lt;br /&gt;
&lt;br /&gt;
That forwards the GUI, which is running on port 8384 on the server, to port 7000 on your local machine.  I chose port 7000 since I was already running Syncthing on my local machine.  Then, in a web browser, just connect to &amp;lt;code&amp;gt;http://localhost:7000&amp;lt;/code&amp;gt; on your machine.&lt;br /&gt;
&lt;br /&gt;
I configured the directories to sync to point to an external hard drive; on my laptops and desktop I just have the folders in my home directory.&lt;br /&gt;
&lt;br /&gt;
Basically, I&#039;m using a systemd unit file to start as a normal user.  There should be one with syncthing when you installed it; I found it in &amp;lt;code&amp;gt;/usr/lib/systemd/user/&amp;lt;/code&amp;gt;.  Copy it to your home directory like this, where &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is your username:&lt;br /&gt;
&lt;br /&gt;
 cp /usr/lib/systemd/user/syncthing.service /home/user/.config/systemd/user/&lt;br /&gt;
&lt;br /&gt;
Next, as a normal user, run these commands to enable the service on boot and start it immediately:&lt;br /&gt;
&lt;br /&gt;
 systemctl enable syncthing@user.service&lt;br /&gt;
 systemctl start syncthing@user.service&lt;br /&gt;
&lt;br /&gt;
You can confirm that it&#039;s running by either using &amp;lt;code&amp;gt;ps&amp;lt;/&amp;gt; or using &amp;lt;code&amp;gt;systemctl&amp;lt;/code&amp;gt; like this:&lt;br /&gt;
&lt;br /&gt;
 systemctl --user status syncthing.service&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Syncthing_Server&amp;diff=40</id>
		<title>Syncthing Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Syncthing_Server&amp;diff=40"/>
		<updated>2020-09-12T19:36:37Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://syncthing.net/ Syncthing] is a tool written in Go to keep files synchronised between computers.  It&#039;s decentralized, meaning instead of syncing to a server, your computers can find each other on the network and sync amongst themselves.  While I don&#039;t use it outside of my home network, it can run over the internet as well - it uses relay and discovery severs, and can even traverse NAT.  &lt;br /&gt;
&lt;br /&gt;
Prior to Syncthing, I used [https://nextcloud.com/ NextCloud], which runs on a web server.  I used this to keep some directories on several computers in my home network synchronized.  It worked, and I actually still have an install I point my phone too (although Syncthing has an Android app as well).  However, sometimes it would be slow, particularly with a lot of small files.  The server also stores all of its files in its own directory, and depends on a database (I have used both MariaDB and SQLite), as opposed to Syncthing which is just its own executable.&lt;br /&gt;
&lt;br /&gt;
One advantage of the central model NextCloud uses is that if you only have one of the computers you&#039;re syncing online, it can still keep the copy of the server up to date.  While Syncthing can deal with conflicts (by renaming the conflicting files), it&#039;s nice to not have to have both machines on for them to sync in all cases.  (Although again, Syncthing can sync the two if only the two of them are online; NextCloud would still need to talk to its server.)  I had already had a machine running with an external hard drive as kind of a stopgap NAS, so I looked into how to get Syncthing going on this as well.&lt;br /&gt;
&lt;br /&gt;
== Syncthing on a Headless Server ==&lt;br /&gt;
&lt;br /&gt;
Syncthing can run just fine on a headless machine, with a caveat - each user requires a running instance.  (This is the case as far as I know, I don&#039;t know if a multiuser version is in the works at the moment.)  Also, on my laptops and desktop, I start it with my desktop environment, whereas my server doesn&#039;t have a GUI installed.  I&#039;d like it to start up on boot, but running as my user.&lt;br /&gt;
&lt;br /&gt;
These instructions are from the [https://docs.syncthing.net/users/autostart.html#linux Syncthing documentation] for autostarting on Linux.  I&#039;m running this on Debian 10 on a single board computer (PC Engines Alix, an i386 board), but it should work on a Raspberry Pi as well.  In fact, with a Pi 3 or 4, it would probably run better.  I&#039;m assuming you have it running and configured on one or more client machines as well.&lt;br /&gt;
&lt;br /&gt;
Basically, I&#039;m using a systemd unit file to start as a normal user.  There should be one with syncthing when you installed it; I found it in &amp;lt;code&amp;gt;/usr/lib/systemd/user/&amp;lt;/code&amp;gt;.  Copy it to your home directory like this, where &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is your username:&lt;br /&gt;
&lt;br /&gt;
 cp /usr/lib/systemd/user/syncthing.service /home/user/.config/systemd/user/&lt;br /&gt;
&lt;br /&gt;
Next, as a normal user, run these commands to enable the service on boot and start it immediately:&lt;br /&gt;
&lt;br /&gt;
 systemctl enable syncthing@user.service&lt;br /&gt;
 systemctl start syncthing@user.service&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Syncthing_Server&amp;diff=39</id>
		<title>Syncthing Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Syncthing_Server&amp;diff=39"/>
		<updated>2020-09-11T03:02:58Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: Created page with &amp;quot;[https://syncthing.net/ Syncthing] is a tool written in Go to keep files synchronised between computers.  It&amp;#039;s decentralized, meaning instead of syncing to a server, your comp...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://syncthing.net/ Syncthing] is a tool written in Go to keep files synchronised between computers.  It&#039;s decentralized, meaning instead of syncing to a server, your computers can find each other on the network and sync amongst themselves.  It can work over the internet as well, although I don&#039;t use it that way.&lt;br /&gt;
&lt;br /&gt;
Prior to Syncthing, I used [https://nextcloud.com/ NextCloud], which runs on a web server.  I used this to keep some directories on several computers in my home network synchronized.  It worked, and I actually still have an install I point my phone too (although Syncthing has an Android app as well).  However, sometimes it would be slow, particularly with a lot of small files.  The server also stores all of its files in its own directory, and depends on a database (I have used both MariaDB and SQLite).&lt;br /&gt;
&lt;br /&gt;
While I like the idea of not having to have a dedicated server in the sense of NextCloud, I do have a NAS I would like to keep the directories I sync on.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
	<entry>
		<id>https://wiki.unixcat.net/index.php?title=Main_Page&amp;diff=38</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.unixcat.net/index.php?title=Main_Page&amp;diff=38"/>
		<updated>2020-06-13T20:01:15Z</updated>

		<summary type="html">&lt;p&gt;ToroidalCore: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the Unixcat.net wiki.  Here you will find different articles and pages that I don&#039;t feel fit into the [https://blog.unixcat.net blog] format.&lt;br /&gt;
&lt;br /&gt;
=== Some Categories to Check Out ===&lt;br /&gt;
&lt;br /&gt;
[[:Category:Desktop Linux]]&lt;br /&gt;
&lt;br /&gt;
Not just GNU/Linux.  Tips, tricks, notes, etc. on using *nix systems on the desktop.&lt;/div&gt;</summary>
		<author><name>ToroidalCore</name></author>
	</entry>
</feed>