<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Systemd automount from fstab ignores uid option and always mounts as uid=0"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=81120">81120</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Systemd automount from fstab ignores uid option and always mounts as uid=0
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>davispuh@gmail.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>systemd
          </td>
        </tr></table>
      <p>
        <div>
        <pre>An entry in fstab:
//REMOTE/share /mnt/share cifs
username=user,password=pass,x-systemd.automount,x-systemd.device-timeout=6,uid=1000,gid=users
0 0

And systemd mounts it as

//REMOTE/share on /mnt/share type cifs
(rw,relatime,vers=1.0,cache=strict,username=user,domain=REMOTE,uid=0,noforceuid,gid=100,forcegid,addr=192.168.1.2,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=61440,wsize=65536,actimeo=1)

but if I mount it manually with

mount -t cifs -o
username=user,password=pass,x-systemd.automount,x-systemd.device-timeout=6,uid=1000,gid=users
//REMOTE/share /mnt/share

uid is correctly set

//REMOTE/share on /mnt/share type cifs
(rw,relatime,vers=1.0,cache=strict,username=user,domain=REMOTE,uid=1000,forceuid,gid=100,forcegid,addr=192.168.1.2,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=61440,wsize=65536,actimeo=1)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>