Bug 4450 - profiles not uploaded correctly to the Samba server (3.0.24)
Summary: profiles not uploaded correctly to the Samba server (3.0.24)
Status: RESOLVED WORKSFORME
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Domain Control (show other bugs)
Version: 3.0.24
Hardware: Other Linux
: P3 major
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-15 06:27 UTC by Tomasz Chmielewski
Modified: 2020-11-16 13:08 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Chmielewski 2007-03-15 06:27:18 UTC
Profiles are not uploaded correctly from Windows 2000 SP4 (German version) to the server running Samba 3.0.24, ARM architecture.

When downgraded to 3.0.14a, problem doesn't happen anymore - so it looks like it's a regression.

Only files in "SendTo" directory is affected (i.e., C:\Dokumente und Einstellungen\username\SendTo\) in default user profile (newly created).


By default, this directory contains these files:

3½-Diskette (A).lnk
Desktop (Verknüpfung erstellen).DeskLink
E-Mail-Empfänger.MAPIMail
Eigene Dateien.mydocs

Usually, one file from "SendTo" directory is uploaded correctly, and two more files are created - with the names like prfF4.tmp.
This means, that on a next logon some files are LOST: when user logs on, he will find files like:

3½-Diskette (A).lnk
prfF4.tmp
prfF5.tmp

in his "SendTo" directory.


Renaming files from "SendTo" directory:

3½-Diskette (A).lnk -> 1.lnk
Desktop (Verknüpfung erstellen).DeskLink -> 2.DeskLink
E-Mail-Empfänger.MAPIMail -> 3.MAPIMail
Eigene Dateien.mydocs -> 4.mydocs

doesn't solve the issue; it still happens.


Other interesting observation is that the issue happens with "log level" set to 9 or below. If we set "log level" to 10, it doesn't happen anymore.


Other interesting observation: if we copy "SendTo" to Desktop, these files are uploaded correctly.

Filesystem is mounted with these options:

# mount
/dev/sda2 on / type ext3 (rw,noatime,nodiratime,errors=remount-ro,acl,user_xattr)


This is smb.conf file:

[global]

workgroup = EXAMPLE
netbios name = JK
interfaces = eth0, lo
bind interfaces only = No
passdb backend = ldapsam:ldap://127.0.0.1
#ldap filter = (uid=%u)
username map = /etc/samba/smbusers

#socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

hosts allow = 192.168.123. 192.168.111. 127.0.0.1

log level = 3
syslog = 0
log file = /var/log/samba/log.%m
max log size = 5000

smb ports = 139 445

name resolve order = host wins bcast

store dos attributes = Yes

time server = Yes

os level = 65

add user script = /usr/sbin/smbldap-useradd -t 30 -a '%u'
delete user script = /usr/sbin/smbldap-userdel '%u'
add group script = /usr/sbin/smbldap-groupadd -p '%g'
delete group script = /usr/sbin/smbldap-groupdel '%g'
add user to group script = /usr/sbin/smbldap-groupmod -m '%u' '%g'
delete user from group script = /usr/sbin/smbldap-groupmod -x '%u' '%g'
set primary group script = /usr/sbin/smbldap-usermod -g '%g' '%u'
add machine script = /usr/sbin/smbldap-useradd -t 30 -w '%u'

encrypt passwords = true

ldap passwd sync = Yes

# profiles

logon script = scripts\userscript.bat

logon path = \\%L\profiles\%U
logon drive = U:

domain logons = Yes
preferred master = Yes
domain master = Yes
local master = Yes
wins support = Yes

ldap suffix = dc=example,dc=com
ldap machine suffix = ou=Computers
ldap user suffix = ou=Users
ldap group suffix = ou=Groups

ldap idmap suffix = cn=NextFreeUnixId
ldap admin dn = cn=Manager,dc=example,dc=com
ldap replication sleep = 5000
idmap backend = ldap:ldap://127.0.0.1
idmap uid = 10000-20000
idmap gid = 10000-20000
map acl inherit = Yes

# printing
printing = cups
load printers = yes
printer admin = Administrator
printcap name = CUPS
show add printer wizard = Yes

[Shared]
  path = /home/samba/shared
  comment = Shared folder
  browseable = yes
  writeable = yes
  create mask = 1666
  directory mask = 1777
  valid users = unattended, Administrator

[profiles]
  comment = Network Profiles Share
  path = /home/samba/profiles
  read only = no
  store dos attributes = Yes
  create mask = 0600
  directory mask = 0700
  browseable = no
  guest ok = no
  printable = no
  create mask = 0600

[netlogon]
  comment = Network Logon Service
  path = /home/samba/netlogon
  read only = yes
  browseable = no
  acl check permissions = no



Some more info can be found in this thread (titled "roaming profile not uploaded correctly when logging out for the first time"):

http://lists.samba.org/archive/samba/2007-March/thread.html#130330
Comment 1 Björn Jacke 2007-03-15 07:08:42 UTC
as you seem to have xattr enabled and use "store dos attributes". Can you please try setting "map readonly = no" and see if that helps? Sentto is one folder which usually is r/o flagged which will be supported if you set "map readonly = no".
Comment 2 Tomasz Chmielewski 2007-08-06 06:50:56 UTC
"map readonly" is not explained in smb.conf manual - what does it do?
Comment 3 Tomasz Chmielewski 2007-08-06 06:55:38 UTC
All right, it's "map read only"...
Comment 4 Tomasz Chmielewski 2007-09-05 05:32:15 UTC
No, it does not help when I add "map read only = no".
Comment 5 Tomasz Chmielewski 2007-09-05 05:45:06 UTC
All right, one more try: I didn't have the filesystem mounted with acl,user_xattr now.

Now, when it's mounted with acl,user_xattr, the error appears - but when I add "map read only = no", the error doesn't happen anymore.

Thanks.

Is it a bug, or a feature?
Comment 6 Björn Jacke 2007-09-05 06:01:54 UTC
not a bug ;)
Comment 7 Tomasz Chmielewski 2007-09-07 09:42:27 UTC
No, sorry, it didn't help.

I used a local user account, which is not stored on the server. I was so lucky that it works that my brain cells begin to malfunction...


With a domain user which has a profile stored on the server, I'm still getting this error, no matter if it's:

map read only = no
map read only = no
map read only = permissions

It also happens if I have:

store dos attributes = no

Comment 8 Tomasz Chmielewski 2007-09-07 09:45:40 UTC
And, moreover, SendTo on Windows 2000 SP4 is not flagged r/o, nor is any file in this folder.
Comment 9 Tomasz Chmielewski 2007-09-07 10:22:26 UTC
Copying SendTo folder manually to \\server\profiles\user\ works fine - it only happens when the user logs off.
Comment 10 Tomasz Chmielewski 2007-09-07 10:26:12 UTC
So, here is a couple of log file (log level = 3).

First, a file that was uploaded just fine to SendTo during user log off:

[2007/09/07 17:18:58, 3] smbd/process.c:switch_message(914)
  switch message SMBtrans2 (pid 1856) conn 0x3eadf0
[2007/09/07 17:18:58, 3] smbd/trans2.c:call_trans2qfilepathinfo(2908)
  call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = 1004
[2007/09/07 17:18:58, 3] smbd/msdfs.c:dfs_redirect(435)
  dfs_redirect: Not redirecting server-ham/profiles/Domain Admins/administrator/SendTo/Eigene Dateien.mydocs.
[2007/09/07 17:18:58, 3] smbd/msdfs.c:dfs_redirect(439)
  dfs_redirect: Path converted to non-dfs path Domain Admins/administrator/SendTo/Eigene Dateien.mydocs
[2007/09/07 17:18:58, 3] smbd/trans2.c:call_trans2qfilepathinfo(2933)
  call_trans2qfilepathinfo: SMB_VFS_STAT of Domain Admins/administrator/SendTo/Eigene Dateien.mydocs failed (No such file or directory)
[2007/09/07 17:18:58, 3] smbd/error.c:error_packet(146)
  error packet at smbd/trans2.c(2679) cmd=50 (SMBtrans2) NT_STATUS_OBJECT_NAME_NOT_FOUND
[2007/09/07 17:18:58, 3] smbd/process.c:process_smb(1110)
  Transaction 5501 of length 242


The next file, however, is broken - instead of "E-Mail-Empfänger.MAPIMail" it was saved as "prf99.tmp":

[2007/09/07 17:18:58, 3] smbd/process.c:switch_message(914)
  switch message SMBtrans2 (pid 1856) conn 0x3eadf0
[2007/09/07 17:18:58, 3] smbd/trans2.c:call_trans2qfilepathinfo(2908)
  call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = 1004
[2007/09/07 17:18:58, 3] smbd/msdfs.c:dfs_redirect(435)
  dfs_redirect: Not redirecting server-ham/profiles/Domain Admins/administrator/SendTo/E-Mail-Empfänger.MAPIMail.
[2007/09/07 17:18:58, 3] smbd/msdfs.c:dfs_redirect(439)
  dfs_redirect: Path converted to non-dfs path Domain Admins/administrator/SendTo/E-Mail-Empfänger.MAPIMail
[2007/09/07 17:18:58, 3] smbd/trans2.c:call_trans2qfilepathinfo(2933)
  call_trans2qfilepathinfo: SMB_VFS_STAT of Domain Admins/administrator/SendTo/E-Mail-Empfänger.MAPIMail failed (No such file or directory)
[2007/09/07 17:18:58, 3] smbd/error.c:error_packet(146)
  error packet at smbd/trans2.c(2679) cmd=50 (SMBtrans2) NT_STATUS_OBJECT_NAME_NOT_FOUND
[2007/09/07 17:18:58, 3] smbd/process.c:process_smb(1110)
  Transaction 5502 of length 262
[2007/09/07 17:18:58, 3] smbd/process.c:switch_message(914)
  switch message SMBntcreateX (pid 1856) conn 0x3eadf0
[2007/09/07 17:18:58, 3] smbd/msdfs.c:dfs_redirect(435)
  dfs_redirect: Not redirecting server-ham/profiles/Domain Admins/administrator/Startmenü/Programme/Zubehör/prf99.tmp.
[2007/09/07 17:18:58, 3] smbd/msdfs.c:dfs_redirect(439)
  dfs_redirect: Path converted to non-dfs path Domain Admins/administrator/Startmenü/Programme/Zubehör/prf99.tmp
[2007/09/07 17:18:58, 3] smbd/dosmode.c:unix_mode(147)
  unix_mode(Domain Admins/administrator/Startmenü/Programme/Zubehör/prf99.tmp) returning 0744
[2007/09/07 17:18:58, 2] smbd/open.c:open_file(352)
  Administrator opened file Domain Admins/administrator/Startmenü/Programme/Zubehör/prf99.tmp read=Yes write=No (numopen=2)
[2007/09/07 17:18:58, 3] smbd/oplock_linux.c:linux_set_kernel_oplock(167)
  linux_set_kernel_oplock: got kernel oplock on file Domain Admins/administrator/Startmenü/Programme/Zubehör/prf99.tmp, dev = 802, inode = 5472325, file_id = 1385
[2007/09/07 17:18:58, 3] smbd/process.c:process_smb(1110)
  Transaction 5503 of length 45
Comment 11 Tomasz Chmielewski 2007-09-07 10:44:06 UTC
One more observation: mounting the filesystem as "sync" makes the bug disappear... However, the things are pretty slow then, so it's not really a solution.

So, making the machine slow (either by mounting the fs with "sync", or setting "log level = 10") makes that this bug does not happen.

Any clues?
Comment 12 Tomasz Chmielewski 2007-09-25 11:39:29 UTC
I just reproduced it with 3.0.14a (for some reason, Samba versions later than 3.0.24 don't work very well in a domain for me on this ARM machine).

It's quite easy to reproduce:
- go to SendTo folder
- paste everything that is there, copy it several times
- log out
- eventually, it will bail out on a copy of "Eigene Dateien.mydocs" (that is, in a German version of Windows 2000 SP4)

There is an interesting thing about this file - if you copy it to this folder, and then click on its properties, it will disappear...
Comment 13 Björn Jacke 2020-11-16 13:08:36 UTC
writing back profiles is working with current samba versions. You should use acl_xattr and the default utf-8 charset to be on the safe site.