Bug 9678 - Windows 8 Roaming profiles fail
Windows 8 Roaming profiles fail
Status: RESOLVED FIXED
Product: Samba 3.6
Classification: Unclassified
Component: File services
3.6.12
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-25 22:30 UTC by Diego Remolina
Modified: 2014-07-29 15:48 UTC (History)
10 users (show)

See Also:


Attachments
Client logs for Windows 7 and Windows 8 machines Debug lvl 3 (655.68 KB, application/octet-stream)
2013-02-25 22:30 UTC, Diego Remolina
no flags Details
network capture of failure to store profile on samba 3.6 (2.62 MB, application/vnd.tcpdump.pcap)
2013-07-31 14:30 UTC, Gregor Beck (550 Unknown user)
no flags Details
network capture of successful profile store on w2k3 share (2.47 MB, application/vnd.tcpdump.pcap)
2013-07-31 14:34 UTC, Gregor Beck (550 Unknown user)
no flags Details
patch for master and 3.6 (1.98 KB, patch)
2013-07-31 14:56 UTC, Gregor Beck (550 Unknown user)
metze: review-
Details
patch for 3.6, 4.0 and master (2.15 KB, patch)
2013-08-01 12:34 UTC, Gregor Beck (550 Unknown user)
metze: review+
jra: review+
Details
script to set sd with different security_info bits (1.86 KB, application/x-shellscript)
2013-08-02 13:17 UTC, Gregor Beck (550 Unknown user)
no flags Details
network capture of secinfo.sh run with lower bits not set (1.91 MB, application/vnd.tcpdump.pcap)
2013-08-02 13:20 UTC, Gregor Beck (550 Unknown user)
no flags Details
network capture of secinfo.sh run with lower bits set to 0xf (1.84 MB, application/vnd.tcpdump.pcap)
2013-08-02 13:24 UTC, Gregor Beck (550 Unknown user)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Remolina 2013-02-25 22:30:55 UTC
Created attachment 8582 [details]
Client logs for Windows 7 and Windows 8 machines Debug lvl 3

I am configuring a new CentOS 6.3 machine (6.4 not out yet, even though RHEL 6.4 is) to be a samba server. I have tried the rpms from 3.5.10-125 bundled with Centos 6.3, also rebuilt the 3.6.9-151 srpm from RHEL 6.4 under centos, and finally tried the 3.6.12 sources from samba.org with the spec file from Red Hat.

In all 3 samba packages, roaming profiles seem to work fine with Windows 7 and Vista machines, but fail on Windows 8 machines.

The failure on Windows 8 machines is shown during log off:

Your roaming user profile was not completely synchronized. See event log for details or contact administrator.

On the Windows 7 machine, the roaming profile works correctly and there are not error messages on the event viewer.

On the Windows 8 machine, the error messages from the event viewer are:

Level	Date and Time	Source	Event ID	Task Category
Warning	2/25/2013 5:15:50 PM	Microsoft-Windows-Winlogon	6001	None	The winlogon notification subscriber <Profiles> failed a notification event.
Error	2/25/2013 5:15:45 PM	Microsoft-Windows-User Profiles Service	1504	None	"Windows cannot update your roaming profile completely. Check previous events for more details. 

"
Warning	2/25/2013 5:15:44 PM	Microsoft-Windows-User Profiles General	1534	None	"There are too many profile copy errors. Refer to the previous events for details. Windows will not log any additional copy errors for this copy process. 

"
Warning	2/25/2013 5:15:44 PM	Microsoft-Windows-User Profiles General	1509	None	"Windows cannot copy file \\?\C:\Users\dijuremo\Favorites\desktop.ini to location \\?\UNC\p3file\Users\dijuremo\.winprofile.V2\Favorites\desktop.ini. This error may be caused by network problems or insufficient security rights. 

 DETAIL - The parameter is incorrect.
"
Warning	2/25/2013 5:15:43 PM	Microsoft-Windows-User Profiles General	1509	None	"Windows cannot copy file \\?\C:\Users\dijuremo\AppData\Roaming\Microsoft\Internet Explorer\UserData\Low to location \\?\UNC\p3file\Users\dijuremo\.winprofile.V2\AppData\Roaming\Microsoft\Internet Explorer\UserData\Low. This error may be caused by network problems or insufficient security rights. 

 DETAIL - The parameter is incorrect.
"
Warning	2/25/2013 5:15:43 PM	Microsoft-Windows-User Profiles General	1509	None	"Windows cannot copy file \\?\C:\Users\dijuremo\AppData\Roaming\Microsoft\Windows\Cookies\Low to location \\?\UNC\p3file\Users\dijuremo\.winprofile.V2\AppData\Roaming\Microsoft\Windows\Cookies\Low. This error may be caused by network problems or insufficient security rights. 

 DETAIL - The parameter is incorrect.
"
Warning	2/25/2013 5:15:43 PM	Microsoft-Windows-User Profiles General	1509	None	"Windows cannot copy file \\?\C:\Users\dijuremo\AppData\Roaming\Microsoft\Windows\IECompatCache\Low to location \\?\UNC\p3file\Users\dijuremo\.winprofile.V2\AppData\Roaming\Microsoft\Windows\IECompatCache\Low. This error may be caused by network problems or insufficient security rights. 

 DETAIL - The parameter is incorrect.
"
Warning	2/25/2013 5:15:43 PM	Microsoft-Windows-User Profiles General	1509	None	"Windows cannot copy file \\?\C:\Users\dijuremo\AppData\Roaming\Microsoft\Windows\IECompatUACache\Low to location \\?\UNC\p3file\Users\dijuremo\.winprofile.V2\AppData\Roaming\Microsoft\Windows\IECompatUACache\Low. This error may be caused by network problems or insufficient security rights. 

 DETAIL - The parameter is incorrect.
"
Warning	2/25/2013 5:15:43 PM	Microsoft-Windows-User Profiles General	1509	None	"Windows cannot copy file \\?\C:\Users\dijuremo\AppData\Roaming\Microsoft\Windows\PrivacIE\Low to location \\?\UNC\p3file\Users\dijuremo\.winprofile.V2\AppData\Roaming\Microsoft\Windows\PrivacIE\Low. This error may be caused by network problems or insufficient security rights. 

 DETAIL - The parameter is incorrect.
"
Warning	2/25/2013 5:15:43 PM	Microsoft-Windows-User Profiles General	1509	None	"Windows cannot copy file \\?\C:\Users\dijuremo\Favorites to location \\?\UNC\p3file\Users\dijuremo\.winprofile.V2\Favorites. This error may be caused by network problems or insufficient security rights. 

 DETAIL - The parameter is incorrect.
"
Warning	2/25/2013 5:15:43 PM	Microsoft-Windows-User Profiles General	1509	None	"Windows cannot copy file \\?\C:\Users\dijuremo\Favorites\Links to location \\?\UNC\p3file\Users\dijuremo\.winprofile.V2\Favorites\Links. This error may be caused by network problems or insufficient security rights. 

 DETAIL - The parameter is incorrect.
"
Warning	2/25/2013 5:15:43 PM	Microsoft-Windows-User Profiles General	1509	None	"Windows cannot copy file \\?\C:\Users\dijuremo\Favorites\Links for United States to location \\?\UNC\p3file\Users\dijuremo\.winprofile.V2\Favorites\Links for United States. This error may be caused by network problems or insufficient security rights. 

 DETAIL - The parameter is incorrect.
"
Warning	2/25/2013 5:15:42 PM	Microsoft-Windows-User Profiles Service	1530	None	"Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards.  

 DETAIL - 
 4 user registry handles leaked from \Registry\User\S-1-5-21-436374069-1085031214-682003330-3114:
Process 2920 (\Device\HarddiskVolume2\Windows\System32\cmd.exe) has opened key \REGISTRY\USER\S-1-5-21-436374069-1085031214-682003330-3114
Process 2956 (\Device\HarddiskVolume2\Windows\System32\PrintIsolationHost.exe) has opened key \REGISTRY\USER\S-1-5-21-436374069-1085031214-682003330-3114
Process 2920 (\Device\HarddiskVolume2\Windows\System32\cmd.exe) has opened key \REGISTRY\USER\S-1-5-21-436374069-1085031214-682003330-3114\Software\Microsoft\Windows NT\CurrentVersion
Process 432 (\Device\HarddiskVolume2\Windows\System32\svchost.exe) has opened key \REGISTRY\USER\S-1-5-21-436374069-1085031214-682003330-3114\Software\Microsoft\Windows\CurrentVersion\Uninstall
"

I can provide smb.conf if needed. Any help in fixing this issue would be greatly appreciated.
Comment 1 Diego Remolina 2013-02-26 00:14:25 UTC
Windows 7 Roaming profiles break if I comment out the following smb.conf entry:

        store dos attributes = yes

With that entry enabled in smb.conf, both Windows 7 and Windows Vista can get and send roaming profiles to the 3.6.12 samba server, but Windows 8 still cannot.

My old samba server running CentOS 4 and samba 3.4.9 does not use the store dos attributes option and roaming profiles work properly in all Vista/7/8.

Some differences are that the old server has ext3 file system mounted with these options:

(rw,usrquota,grpquota,acl,user_xattr)

New server is using btrfs, but I have also tried moving the profiles folder to an ext4 partition and I get the same results, so I do not believe is file system related as both btrfs and ext4 have the same problem.
Comment 2 Zane Zakraisek 2013-02-28 23:54:56 UTC
I too am experiencing the same problem with my Samba 4 server. I am running a Samba 4.0.3 ADDC. I am getting very similar errors (pretty much the exact same files and directories are failing, with a few different files here and there) in my Windows 8 log when I try to sync up my roaming profile.
I have not set up folder redirection because the files that aren't being replicated aren't of big importance to me. The biggest annoyance is that I have to log into all my sites again even though I selected the option to be remembered. 

All the errors say that the "Parameter is incorrect"

My Windows 7 machines work great. 

I did read that Windows 7 and Windows 8 roaming profiles are not compatible(http://support.microsoft.com/kb/2748329). It said when you have a Windows 7 profile.V2, and log into a Windows 8 machine with the same account, that it will upgrade your Windows 7 profile.v2 into a Windows 8 profile.V2, and that you will have serious problems logging back into Windows 7 machine. I have a very hard time believing this though. I would think Microsoft would be smart enough to create a Profile.v3 for compatibility issues instead of wrecking your profile every time you went back and forth between 7 and 8. 
I did though, create a GPO to change the user profile directories and applied a WMI filter for Windows 8 machines, so that I could log into the same account and have separate profiles for Windows 7 and Vista computers than my Windows 8 machines

So even after isolating my Windows 8 profiles from the ones of my Windows 7 and Vista machines, I am still having the same problems
Comment 3 Rainer Meier 2013-03-16 12:29:05 UTC
I have also experienced the same issues and reported on the mailing list:

<https://lists.samba.org/archive/samba/2013-January/170768.html>

I am also experiencing errors when copying folders with a desktop.ini inside which maps the folder name using "LocalizedResourceName" property:

<https://lists.samba.org/archive/samba/2012-September/169080.html>

This might be directly related.
Comment 4 Nick Piggott 2013-07-21 20:36:39 UTC
+1 from me. Identical setup, error and error messages.
Comment 5 Gregor Beck (550 Unknown user) 2013-07-31 14:30:59 UTC
Created attachment 9091 [details]
network capture of failure to store profile on samba 3.6
Comment 6 Gregor Beck (550 Unknown user) 2013-07-31 14:34:44 UTC
Created attachment 9092 [details]
network capture of successful profile store on w2k3 share
Comment 7 Gregor Beck (550 Unknown user) 2013-07-31 14:35:42 UTC
Storing the profiles on a w2k3 share works.

Windows 8 tries to set SDs with ATTRIBUTE_SECURITY_INFORMATION (0x00000020) which results in NT_STATUS_INVALID_PARAMETER with samba but is ignored with NT_STATUS_OK by w2k3. 

See beaker_dcks_logoff.pcap vs. beaker_w2k3_logoff.pcap with wireshark filter "frame[138:4] == 20:00:00:00"
Comment 8 Gregor Beck (550 Unknown user) 2013-07-31 14:56:12 UTC
Created attachment 9093 [details]
patch for master and 3.6
Comment 9 Zane Zakraisek 2013-07-31 16:13:26 UTC
Will this patch be placed into the 4.0 branch?
Comment 10 Stefan Metzmacher 2013-08-01 07:59:51 UTC
Comment on attachment 9093 [details]
patch for master and 3.6

I think we better ignore everything, rather than a specific value.
Comment 11 Gregor Beck (550 Unknown user) 2013-08-01 12:34:58 UTC
Created attachment 9095 [details]
patch for 3.6, 4.0 and master

Ignore all the new secinfo flags like w2k3 to avoid similar problems elsewhere
Comment 12 Stefan Metzmacher 2013-08-01 13:41:24 UTC
Comment on attachment 9095 [details]
patch for 3.6, 4.0 and master

Jeremy, can add my review and push it to master?
Comment 13 Jeremy Allison 2013-08-01 16:29:46 UTC
Comment on attachment 9095 [details]
patch for 3.6, 4.0 and master

Yes, this looks like the correct fix to me. Thanks. I'll push to master.

Jeremy.
Comment 14 Jeremy Allison 2013-08-01 18:21:50 UTC
Re-assigning to Karolin for inclusion in 3.6.next, 4.0.next, 4.1.0.

Jeremy.
Comment 15 Gregor Beck (550 Unknown user) 2013-08-02 13:17:49 UTC
Created attachment 9101 [details]
script to set sd with different security_info bits
Comment 16 Gregor Beck (550 Unknown user) 2013-08-02 13:20:57 UTC
Created attachment 9102 [details]
network capture of secinfo.sh run with lower bits not set

w2k3 does nothing and ignores bits 4-31
Comment 17 Gregor Beck (550 Unknown user) 2013-08-02 13:24:22 UTC
Created attachment 9103 [details]
network capture of secinfo.sh run with lower bits set to 0xf

w2k3 sets SD and ignores bits 4-31
Comment 18 Ronald 2013-08-05 12:50:01 UTC
Hi all,

I am very new to the list. 

I do have this same problem with windows 8 roaming profiles and samba 3.6.3. 

What I am confused about: is there or is there not a patch for this problem? I just can't seem to find a patch. 

Any help is appreciated

Regards,

Ronald
Comment 19 Zane Zakraisek 2013-08-05 13:02:52 UTC
If I'm not mistaken, this is the patch.
http://git.samba.org/?p=samba.git;a=commit;h=f556e71db74e695349c03bf82f68ea6e700eae03
Comment 20 Ronald 2013-08-05 13:04:21 UTC
(In reply to comment #19)
> If I'm not mistaken, this is the patch.
> http://git.samba.org/?p=samba.git;a=commit;h=f556e71db74e695349c03bf82f68ea6e700eae03

Yes I had found that page.. But I don't see how to apply this patch..
Comment 21 Karolin Seeger 2013-08-05 18:03:49 UTC
(In reply to comment #20)
> (In reply to comment #19)
> > If I'm not mistaken, this is the patch.
> > http://git.samba.org/?p=samba.git;a=commit;h=f556e71db74e695349c03bf82f68ea6e700eae03
> 
> Yes I had found that page.. But I don't see how to apply this patch..

Save the patch, change to your git checkout and run 'git am $patch' re-compile.
The patch will be included in Samba 3.6.18, currently planned for August 14.
Comment 22 Karolin Seeger 2013-08-05 18:04:44 UTC
Pushed to autobuild-v4-1-test, autobuild-v4-0-test and v3-6-test.
Comment 23 Karolin Seeger 2013-08-07 09:08:47 UTC
Pushed to v4-1-test and v4-0-test.
Closing out bug report.

Thanks!
Comment 24 Marcio Merlone 2014-07-29 13:28:15 UTC
Hi. I am running sernet-samba 4.1.9-8 on a Ubuntu 14.04.01 x64 server, and still get this exactly same error for a Windows 8 (not 8.1) machine. Is this really fixed or no one else uses roaming profiles anymore?
Comment 25 Zane Zakraisek 2014-07-29 15:48:04 UTC
(In reply to comment #24)
> Hi. I am running sernet-samba 4.1.9-8 on a Ubuntu 14.04.01 x64 server, and
> still get this exactly same error for a Windows 8 (not 8.1) machine. Is this
> really fixed or no one else uses roaming profiles anymore?


This patch has worked great for me on windows 8 and 8.1.
Maybe check the permissions on the directory your keeping the profiles in.