<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - fstab-generator creates incorrect mount units for CIFS"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89851">89851</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>fstab-generator creates incorrect mount units for CIFS
</td>
</tr>
<tr>
<th>Product</th>
<td>systemd
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Assignee</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>artyom.h31@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>Hello. I'm using systemd 219 on Ubuntu 15.04.
I have the following line in /etc/fstab:
\\192.168.1.110\ExtHDD /mnt/nas cifs
vers=3.0,nofail,credentials=/etc/net_pass,uid=1000,gid=1000 0 0
"sudo mount /mnt/nas/" works properly in this case. Hovewer, fstab-generator
creates an incorrect mount unit:
# Automatically generated by systemd-fstab-generator
[Unit]
SourcePath=/etc/fstab
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
[Mount]
What=\192.168.1.110\ExtHDD
Where=/mnt/nas
Type=cifs
Options=vers=3.0,nofail,credentials=/etc/net_pass,uid=1000,gid=1000
Note a missing backslash before the IP address. "systemctl status
mnt-nas.mount" obviously tells that unit wasn't able to start:
марта 31 20:23:32 artyom-H97-D3H mount[7360]: mount.cifs: bad UNC
(\192.168.1.110\ExtHDD)
Let's add more backslashes to the CIFS path:
\\\\192.168.1.110\\ExtHDD /mnt/nas cifs
vers=3.0,nofail,credentials=/etc/net_pass,uid=1000,gid=1000 0 0
In this case, generated mount unit is correct:
# Automatically generated by systemd-fstab-generator
[Unit]
SourcePath=/etc/fstab
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
[Mount]
What=\\192.168.1.110\ExtHDD
Where=/mnt/nas
Type=cifs
Options=vers=3.0,nofail,x-gvfs-show,credentials=/etc/nas_passwd,uid=1000,gid=1000,cache=loose
However, mount commands refuses to work:
$ sudo mount /mnt/nas
mount.cifs: bad UNC (\\\\192.168.1.110\\ExtHDD)
I don't precisely know if fstab entries should contain escape characters (extra
backslashes). Nonetheless, fstab-generator and mount command should have the
same behaviour anyway.</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>