<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";
mso-ligatures:none;
mso-fareast-language:EN-GB;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m using systemd-v254.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My rdisc service fails to start when “<span style="font-size:9.0pt;font-family:"Courier New"">DynamicUser=yes</span>”, and the error message comes from
<a href="https://github.com/systemd/systemd-stable/blob/v254-stable/src/core/execute.c#L5019">
systemd.execute.c</a>. It’s complaining about the <span style="font-size:9.0pt;font-family:"Courier New"">
/etc/.pwd.lock</span> file (see journal below).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I turned on debug (<span style="font-size:9.0pt;font-family:"Courier New"">systemd-analyze set-log-level debug</span>) and then attempted to start the rdisc.service. This is an extract from the journal:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:solid windowtext 1.0pt;padding:1.0pt 1.0pt 1.0pt 1.0pt;background:#DEEAF6">
<p class="MsoNormal" style="background:#DEEAF6;border:none;padding:0cm"><span style="font-size:8.0pt;font-family:"Courier New";color:black;mso-ligatures:none;mso-fareast-language:EN-GB">$
</span><span style="font-size:9.0pt;font-family:"Courier New";color:black;mso-ligatures:none;mso-fareast-language:EN-GB">journalctl -f</span><span style="font-size:9.0pt;font-family:"Courier New";mso-ligatures:none;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:#DEEAF6;border:none;padding:0cm"><span style="font-size:9.0pt;font-family:"Courier New";color:black;mso-ligatures:none;mso-fareast-language:EN-GB">:</span><span style="font-size:9.0pt;font-family:"Courier New";mso-ligatures:none;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<pre style="background:#DEEAF6;border:none;padding:0cm"><span style="font-size:9.0pt;color:black">Sep 14 03:26:19 sph-093-rmc systemd[1]: </span><span style="font-size:9.0pt;color:#8A8A8A">rdisc.service: Forked /sbin/rdisc as 24873</span><span style="font-size:9.0pt;color:black"> </span><span style="font-size:9.0pt"><o:p></o:p></span></pre>
<pre style="background:#DEEAF6;border:none;padding:0cm"><span style="font-size:9.0pt;color:black">Sep 14 03:26:19 sph-093-rmc (rdisc)[24873]: </span><span style="font-size:9.0pt;color:#8A8A8A;background:yellow;mso-highlight:yellow">Cannot open /etc/.pwd.lock: Too many levels of symbolic links</span><span style="font-size:9.0pt;color:black"> </span><span style="font-size:9.0pt"><o:p></o:p></span></pre>
<pre style="background:#DEEAF6;border:none;padding:0cm"><span style="font-size:9.0pt;color:black">Sep 14 03:26:19 sph-093-rmc (rdisc)[24873]: </span><b><span style="font-size:9.0pt;color:#CD3131">rdisc.service: Failed to update dynamic user credentials: Too many levels of symboli</span></b><span style="font-size:9.0pt"><o:p></o:p></span></pre>
<pre style="background:#DEEAF6;border:none;padding:0cm"><span style="font-size:9.0pt;color:black">c links </span><span style="font-size:9.0pt"><o:p></o:p></span></pre>
<pre style="background:#DEEAF6;border:none;padding:0cm"><span style="font-size:9.0pt;color:black">Sep 14 03:26:19 sph-093-rmc (rdisc)[24873]: </span><b><span style="font-size:9.0pt;color:#CD3131">rdisc.service: Failed at step USER spawning /sbin/rdisc: Too many levels of symbolic</span></b><span style="font-size:9.0pt"><o:p></o:p></span></pre>
<pre style="background:#DEEAF6;border:none;padding:0cm"><span style="font-size:9.0pt;color:black"> links </span><span style="font-size:9.0pt"><o:p></o:p></span></pre>
<pre style="background:#DEEAF6;border:none;padding:0cm"><span style="font-size:9.0pt;color:black">Sep 14 03:26:19 sph-093-rmc systemd[1]: </span><span style="font-size:9.0pt;color:#8A8A8A">Sent message type=signal sender=org.freedesktop.systemd1 destination=n/a path=/org/freed</span><span style="font-size:9.0pt"><o:p></o:p></span></pre>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I can override it with “<span style="font-size:9.0pt;font-family:"Courier New"">DynamicUser=no</span>” and the service starts. However, I’m trying to understand why it reports “too many levels of symbolic links”. The lock file is a single-level
symlink to a file in <span style="font-size:9.0pt;font-family:"Courier New"">sysconfig</span>. (This is an embedded device, where
<span style="font-size:9.0pt;font-family:"Courier New"">/etc</span> is read-only and
<span style="font-size:9.0pt;font-family:"Courier New"">/etc/sysconfig</span> is writeable).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:solid windowtext 1.0pt;padding:1.0pt 1.0pt 1.0pt 1.0pt;background:#DEEAF6">
<pre style="background:#DEEAF6;border:none;padding:0cm"><span style="font-size:9.0pt;color:black">$ ls -l /etc/.pwd.lock</span><span style="font-size:9.0pt"><o:p></o:p></span></pre>
<pre style="background:#DEEAF6;border:none;padding:0cm"><span style="font-size:9.0pt;color:black">lrwxrwxrwx 1 root root 19 Apr 5 2011 /etc/.pwd.lock -> sysconfig/.pwd.lock</span><span style="font-size:9.0pt"><o:p></o:p></span></pre>
<pre style="background:#DEEAF6;border:none;padding:0cm"><span style="font-size:9.0pt;color:black">$ ls -l /etc/sysconfig/.pwd.lock</span><span style="font-size:9.0pt"><o:p></o:p></span></pre>
<pre style="background:#DEEAF6;border:none;padding:0cm"><span style="font-size:9.0pt;color:black">-rw------- 1 root root 0 Aug 16 07:25 /etc/sysconfig/.pwd.lock</span><span style="font-size:9.0pt"><o:p></o:p></span></pre>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">For the purpose of investigation, I configured an overlay so
<span style="font-size:9.0pt;font-family:"Courier New"">/etc/.pwd.lock</span> was a simple writeable file (not a read-only symlink) and the service starts.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Why is systemd complaining about the file being a symlink?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Matt.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>