<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Knowledge Base (Posts about ipasam)</title><link>https://bgstack15.ddns.net/blog/</link><description></description><atom:link href="https://bgstack15.ddns.net/blog/categories/ipasam.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2022 &lt;a href="mailto:bgstack15@gmail.com"&gt;bgstack15&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"&gt;
&lt;img alt="Creative Commons License BY-SA"
style="border-width:0; margin-bottom:12px;"
src="https://bgstack15.ddns.net/.images/l_by-sa_4.0_88x31.png"&gt;&lt;/a&gt;</copyright><lastBuildDate>Fri, 13 May 2022 13:15:31 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Update ipasam rpm</title><link>https://bgstack15.ddns.net/blog/posts/2022/05/13/update-ipasam-rm/</link><dc:creator>bgstack15</dc:creator><description>&lt;h3&gt;Overview&lt;/h3&gt;
&lt;p&gt;Update-ipasam-rpm is a project that facilitates building a custom rpm with just the one file that samba needs to authenticate users to ipa.&lt;/p&gt;
&lt;h3&gt;Update-ipasam-rpm upstream&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://gitlab.com/bgstack15/ipasam/"&gt;Gitlab&lt;/a&gt; is the upstream. This is original work.&lt;/p&gt;
&lt;h3&gt;Reason for existing&lt;/h3&gt;
&lt;p&gt;The proper &lt;code&gt;ipa-server-trust-ad&lt;/code&gt; rpm has a large number of dependencies which are not necessary merely when using samba with ipa user authentication, so this project copies that file out and builds a small rpm just for the one file. This makes my samba file server need fewer packages installed.&lt;/p&gt;
&lt;h3&gt;Alternatives&lt;/h3&gt;
&lt;p&gt;Install &lt;code&gt;ipa-server-trust-ad&lt;/code&gt; with all of its dependencies, which is way more than I want to use when I just need ipasam.so.&lt;/p&gt;
&lt;h3&gt;Dependencies&lt;/h3&gt;
&lt;p&gt;For any rpm-based system, but primarily AlmaLinux 8, the server that runs the cron job needs a few things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Http/s access to a package mirror&lt;/li&gt;
&lt;li&gt;Https access to &lt;a href="https://copr.fedorainfracloud.org/"&gt;copr&lt;/a&gt; to initiate builds&lt;/li&gt;
&lt;li&gt;Https access to &lt;a href="https://gitlab.com/bgstack15/ipasam/"&gt;gitlab&lt;/a&gt; to pull ipasam.spec template&lt;/li&gt;
&lt;li&gt;Packages: &lt;code&gt;copr-cli&lt;/code&gt;, &lt;code&gt;rpmbuild&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Unprivileged user, shown in this documentation as username &lt;code&gt;copruser&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The copr api can be used with a copr user with a generated api key (&lt;a href="https://copr.fedorainfracloud.org/api/"&gt;Reference 1&lt;/a&gt;).&lt;/p&gt;
&lt;h3&gt;Files in the project&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;~copruser/.config/copr&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~copruser/.config/ipasam&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~copruser/bin/update-ipasam-rpm.sh&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/etc/cron/70_ipasam_cron&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~copruser/.cache/ipasam.spec&lt;/code&gt; (generated by modifying spec from this repo)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~copruser/.cache/ipa-server-trust-ad.ver&lt;/code&gt; (generated)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~copruser/rpmbuild/SRPMS/iapsam*.srpm&lt;/code&gt; (generated)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Usage&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Create user &lt;code&gt;copruser&lt;/code&gt; or other unprivileged user as desired. &lt;/li&gt;
&lt;li&gt;Deploy the non-generated files from this repository to the above locations and inspect the config files.&lt;/li&gt;
&lt;li&gt;Prepare a user on the &lt;a href="https://copr.fedorainfracloud.org/"&gt;copr&lt;/a&gt; and generate an api key and place in file &lt;code&gt;~copruser/.config/copr&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the command manually to see it operate.&lt;/p&gt;
&lt;p&gt;~/bin/update-ipasam-rpm.sh&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Visit your copr project to see the ipasam rpm that you built!&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Differences from upstream&lt;/h3&gt;
&lt;p&gt;N/A&lt;/p&gt;
&lt;h3&gt;References&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://copr.fedorainfracloud.org/api/"&gt;COPR API introduction&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</description><category>cron</category><category>dependencies</category><category>ipa</category><category>ipasam</category><guid>https://bgstack15.ddns.net/blog/posts/2022/05/13/update-ipasam-rm/</guid><pubDate>Fri, 13 May 2022 13:02:37 GMT</pubDate></item></channel></rss>