Comment 12 for bug 1113395

Steve Jordahl (sjordahl) wrote :

I ran across this issue today and found that when the cifs.ko module is loaded /proc/fs/cifs/SecurityFlags is set differently (0x81) than previous versions of Ubuntu (0x7). Changing the parameter allowed me to connect properly:

echo 0x7 > /proc/fs/cifs/SecurityFlags
cat /proc/fs/cifs/SecurityFlags

The following explains the use of the parameter:

I did a bit of searching, but wasn't able to find a clean way of setting it at boot since on this system I'm not sure that the cifs module will be loaded at boot. I haven't looked at the source, but I'm guessing it's hard coded.

Not that it's relevant here, but my need for the functionality was so XCP could properly mount CIFS shares. To solve my issue, since I couldn't do it at boot, was to patch /usr/lib/xcp/xm/ with the following patch:

--- 2013-04-09 21:46:13.734220000 -0600
+++ 2013-04-09 21:46:13.734220000 -0600
@@ -264,6 +264,9 @@
             f.write("username=%s\npassword=%s\n" % (username,password))
             credentials = "credentials=%s" % self.credentials
+ f = open('/proc/fs/cifs/SecurityFlags', 'w')
+ f.write('0x7')
+ f.close()
             mountcmd.extend(["-o", credentials])

     def _cleanupcredentials(self):

Hope this helps.