<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>diskstation &amp;mdash; Kevin Sandy</title>
    <link>https://kevinsandy.com/tag:diskstation</link>
    <description>Thoughts, musings, ramblings, and rants</description>
    <pubDate>Fri, 17 Apr 2026 07:52:17 +0000</pubDate>
    <image>
      <url>https://i.snap.as/IC0yYUyI.png</url>
      <title>diskstation &amp;mdash; Kevin Sandy</title>
      <link>https://kevinsandy.com/tag:diskstation</link>
    </image>
    <item>
      <title>Synology DiskStation User Mapping</title>
      <link>https://kevinsandy.com/synology-diskstation-user-mapping?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[I have a Synology DiskStation providing file services to my home and lab networks. It works great as-is for SMB access, but NFS access was problematic because the automatic UID / GID generation didn&#39;t match the IDs used by my Linux systems. Since I already store Unix attributes in Active Directory, I needed the DiskStation to respect those.&#xA;&#xA;!--more--&#xA;&#xA;The first step to acheive this is to update the Samba configuration (/etc/samba/smb.conf) on your DiskStation. Adding the configuration below will get Samba to use the Active Directory attributes. I use 100000-199999 for my user and group IDs. If you use different values you may need to adjust it a bit. If you don&#39;t yet have Unix attributes assigned to your Active Directory users, check out Assigning Unix Attributes to Active Directory Objects for how I&#39;ve gone about that.&#xA;&#xA;[global]&#xA;    idmap config  : backend=tdb&#xA;    idmap config  : range=3000-7999&#xA;    idmap config DIGITALLOTUS : backend=ad&#xA;    idmap config DIGITALLOTUS : range=100000-199999&#xA;    idmap config DIGITALLOTUS : schemamode=rfc2307&#xA;    idmap config DIGITALLOTUS : unixnssinfo=yes&#xA;    idmap config DIGITALLOTUS : unixprimary_group=yes&#xA;&#xA;Once that is in place, restart your DiskStation. After it&#39;s up, you can check the user ID by running id user@corp.example.com and see that... it&#39;s still showing the automatically generated ID? That&#39;s actually expected at this point because of some of the DiskStation internals. If you run wbinfo -i &#34;user@corp.example.com&#34;, which will query Samba directly, you should see the right information.&#xA;&#xA;So, how do we now get the DiskStation to recognize the updated values? We have to clear its cached mappings. You can do that by running the command below.&#xA;&#xA;find /volume1/@accountdb \( -type f -o -type l \) -delete&#xA;&#xA;After running that command, you should be able to rerun id user@corp.example.com and see the right attributes. I did all this prior to setting up my shares and permissions. If you already have shares and permissions setup, you&#39;ll likely need to reapply your permissions to get them working with the new ID values.&#xA;&#xA;#activedirectory #diskstation]]&gt;</description>
      <content:encoded><![CDATA[<p>I have a Synology DiskStation providing file services to my home and lab networks. It works great as-is for SMB access, but NFS access was problematic because the automatic UID / GID generation didn&#39;t match the IDs used by my Linux systems. Since I already store Unix attributes in Active Directory, I needed the DiskStation to respect those.</p>



<p>The first step to acheive this is to update the Samba configuration (<code>/etc/samba/smb.conf</code>) on your DiskStation. Adding the configuration below will get Samba to use the Active Directory attributes. I use 100000-199999 for my user and group IDs. If you use different values you may need to adjust it a bit. If you don&#39;t yet have Unix attributes assigned to your Active Directory users, check out <a href="./assigning-unix-attributes-to-active-directory-object">Assigning Unix Attributes to Active Directory Objects</a> for how I&#39;ve gone about that.</p>

<pre><code class="language-ini">[global]
    idmap config * : backend=tdb
    idmap config * : range=3000-7999
    idmap config DIGITALLOTUS : backend=ad
    idmap config DIGITALLOTUS : range=100000-199999
    idmap config DIGITALLOTUS : schema_mode=rfc2307
    idmap config DIGITALLOTUS : unix_nss_info=yes
    idmap config DIGITALLOTUS : unix_primary_group=yes
</code></pre>

<p>Once that is in place, restart your DiskStation. After it&#39;s up, you can check the user ID by running <code>id user@corp.example.com</code> and see that... it&#39;s still showing the automatically generated ID? That&#39;s actually expected at this point because of some of the DiskStation internals. If you run <code>wbinfo -i &#34;user@corp.example.com&#34;</code>, which will query Samba directly, you should see the right information.</p>

<p>So, how do we now get the DiskStation to recognize the updated values? We have to clear its cached mappings. You can do that by running the command below.</p>

<pre><code class="language-bash">find /volume1/@accountdb \( -type f -o -type l \) -delete
</code></pre>

<p>After running that command, you should be able to rerun <code>id user@corp.example.com</code> and see the right attributes. I did all this prior to setting up my shares and permissions. If you already have shares and permissions setup, you&#39;ll likely need to reapply your permissions to get them working with the new ID values.</p>

<p><a href="https://kevinsandy.com/tag:activedirectory" class="hashtag"><span>#</span><span class="p-category">activedirectory</span></a> <a href="https://kevinsandy.com/tag:diskstation" class="hashtag"><span>#</span><span class="p-category">diskstation</span></a></p>
]]></content:encoded>
      <guid>https://kevinsandy.com/synology-diskstation-user-mapping</guid>
      <pubDate>Thu, 15 Dec 2022 12:55:32 +0000</pubDate>
    </item>
  </channel>
</rss>