Patrik Dufresne
2007-Jul-01 18:45 UTC
[Samba] Roaming profile - Folder redirection - Erase file on server
[I post the same message on Ubuntu forum]
Hi,
I need help to fix a problem with Samba as PDC and Folder redirection on a
Roaming Profile. I know it's not the best place to post this, but I
don't
know any better place. So if you have suggestion, tell me.
Here my problem :
I'm in a testing environement with a Samba server setup as a PDC with some
share (netlogon, profiles) to support roaming profile. My "smb.conf"
file
contain the good configuration parameters for "logon path" and
"logon home"
etc ..
For my roaming profile, I setup a Folder redirection using the
"HKEY_CURRENT_USER\Software\Microsoft\Windows\Curr entVersion\Explorer\User
Shell Folders" registery key. I modify the value of AppData, Cookies,
Desktop, Favorites, My Pictures, Personal. Every folder are redirect to the
network share with %LOGONSERVER% and %USERNAME% variable. There is no
problem with the redirection, when I connect every thing are correctly
redirect.
For example, if I create a file named "textfile.txt" on my desktop, I
see it
on the shared folder. (I do a "ls" command with ssh directly on the
server
to be sure). I can add, remove, edit file on the desktop and every thing are
OK.
The problem come when I logout The window client do some sort of
synchronization of a local folder with the shared folder. For example,
C:\Documents and Seetings\admin\Desktop\ with
\\MyServer\profiles\admin\Desktop. I fact, it's not a synchronization,
it's
just delete the shared folder and replace it by the content of the local
folder. The result is that every modification done on the desktop (that are
redirected) are lost at the logout.
It's a very annoying problem that I can't solve by my self. I search
everywhere without any tips.
I try some config with "ExcludeProfileDirs" registry key without
success.
It's possible that I don't use it correctly.
Thank for you help and comment.
[global]
dos charset = 850
unix charset = UTF8
workgroup = ENTREPRISESMD
server string = Samba server
passdb backend = ldapsam:ldap://127.0.0.1/
time server = Yes
deadtime = 15
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192
SO_SNDBUF=8192
load printers = No
add user script = /usr/sbin/smbldap-useradd -m "%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 -w "%u"
logon script = login.bat OR %U.bat
logon path = \\%L\PROFILES\%U
logon drive = h:
logon home = \\%L\PROFILES\%U
domain logons = Yes
os level = 40
domain master = Yes
dns proxy = No
wins support = Yes
ldap admin dn = cn=admin,dc=entreprisesmd,dc=homeip,dc=net
ldap delete dn = Yes
ldap group suffix = ou=Group
ldap idmap suffix = ou=People
ldap machine suffix = ou=Computers
ldap passwd sync = Yes
ldap suffix = dc=entreprisesmd,dc=homeip,dc=net
ldap user suffix = ou=People
winbind use default domain = Yes
inherit permissions = Yes
inherit acls = Yes
inherit owner = Yes
case sensitive = No
hide files = /desktop.ini/ntuser.ini/NTUSER.*/
msdfs root = Yes
[netlogon]
comment = Network Logon Service
path = /data/usersdata/netlogon
read only = No
browseable = No
[PROFILES]
comment = User profiles
path = /data/usersdata/profiles
read only = No
create mask = 0600
directory mask = 0700
inherit permissions = No
inherit acls = No
inherit owner = No
profile acls = Yes
browseable = No
csc policy = disable
I take a look in the log file c:\windows\debug\usermode\userenv.txt and it's
clear that the windows workstation just remove the file I add on the desktop
USERENV(25c.260) 20:36:52:752 SyncItems: removing <E:\admin\Desktop\New Text
Document.txt>
--
Patrik Dufresne
Thierry Lacoste
2007-Jul-01 19:10 UTC
[Samba] Roaming profile - Folder redirection - Erase file on server
Maybe a problem with offline files. Did you disable them? If not try to do it with gpedit.msc Thierry. On Saturday 30 June 2007 03:01, Patrik Dufresne wrote:> [I post the same message on Ubuntu forum] > > Hi, > > I need help to fix a problem with Samba as PDC and Folder redirection on a > Roaming Profile. I know it's not the best place to post this, but I don't > know any better place. So if you have suggestion, tell me. > > Here my problem : > > I'm in a testing environement with a Samba server setup as a PDC with some > share (netlogon, profiles) to support roaming profile. My "smb.conf" file > contain the good configuration parameters for "logon path" and "logon home" > etc .. > > For my roaming profile, I setup a Folder redirection using the > "HKEY_CURRENT_USER\Software\Microsoft\Windows\Curr entVersion\Explorer\User > Shell Folders" registery key. I modify the value of AppData, Cookies, > Desktop, Favorites, My Pictures, Personal. Every folder are redirect to the > network share with %LOGONSERVER% and %USERNAME% variable. There is no > problem with the redirection, when I connect every thing are correctly > redirect. > > For example, if I create a file named "textfile.txt" on my desktop, I see > it on the shared folder. (I do a "ls" command with ssh directly on the > server to be sure). I can add, remove, edit file on the desktop and every > thing are OK. > > The problem come when I logout The window client do some sort of > synchronization of a local folder with the shared folder. For example, > C:\Documents and Seetings\admin\Desktop\ with > \\MyServer\profiles\admin\Desktop. I fact, it's not a synchronization, it's > just delete the shared folder and replace it by the content of the local > folder. The result is that every modification done on the desktop (that are > redirected) are lost at the logout. > > It's a very annoying problem that I can't solve by my self. I search > everywhere without any tips. > > I try some config with "ExcludeProfileDirs" registry key without success. > It's possible that I don't use it correctly. > > Thank for you help and comment. > > [global] > dos charset = 850 > unix charset = UTF8 > workgroup = ENTREPRISESMD > server string = Samba server > passdb backend = ldapsam:ldap://127.0.0.1/ > time server = Yes > deadtime = 15 > socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 > SO_SNDBUF=8192 > load printers = No > add user script = /usr/sbin/smbldap-useradd -m "%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 -w "%u" > logon script = login.bat OR %U.bat > logon path = \\%L\PROFILES\%U > logon drive = h: > logon home = \\%L\PROFILES\%U > domain logons = Yes > os level = 40 > domain master = Yes > dns proxy = No > wins support = Yes > ldap admin dn = cn=admin,dc=entreprisesmd,dc=homeip,dc=net > ldap delete dn = Yes > ldap group suffix = ou=Group > ldap idmap suffix = ou=People > ldap machine suffix = ou=Computers > ldap passwd sync = Yes > ldap suffix = dc=entreprisesmd,dc=homeip,dc=net > ldap user suffix = ou=People > winbind use default domain = Yes > inherit permissions = Yes > inherit acls = Yes > inherit owner = Yes > case sensitive = No > hide files = /desktop.ini/ntuser.ini/NTUSER.*/ > msdfs root = Yes > > [netlogon] > comment = Network Logon Service > path = /data/usersdata/netlogon > read only = No > browseable = No > > [PROFILES] > comment = User profiles > path = /data/usersdata/profiles > read only = No > create mask = 0600 > directory mask = 0700 > inherit permissions = No > inherit acls = No > inherit owner = No > profile acls = Yes > browseable = No > csc policy = disable > > > > I take a look in the log file c:\windows\debug\usermode\userenv.txt and > it's clear that the windows workstation just remove the file I add on the > desktop > > USERENV(25c.260) 20:36:52:752 SyncItems: removing <E:\admin\Desktop\New > Text Document.txt> > > > -- > Patrik Dufresne
Dragan Krnic
2007-Jul-03 16:09 UTC
[Samba] Re: Roaming profile - Folder redirection - Erase file on server
> I'm in a testing environement with a Samba server setup as a PDC with some > share (netlogon, profiles) to support roaming profile. My "smb.conf" file > contain the good configuration parameters for "logon path" and "logon home" > etc .. > > For my roaming profile, I setup a Folder redirection using the > "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User > Shell Folders" registery key. I modify the value of AppData, Cookies, > Desktop, Favorites, My Pictures, Personal. Every folder are redirect to the > network share with %LOGONSERVER% and %USERNAME% variable. There is no > problem with the redirection, when I connect every thing are correctly > redirect.why did you do that? If you don't redefine default locations of user's shell folders they will normally be part of your profile and would be stored on the server if roaming profiles are not disabled. It is generally not a very good idea to manipulate registries. But if you have a compelling reason to relocate user's shell folders to a network drive, then use your home directory for that instead of profile.> For example, if I create a file named "textfile.txt" on my desktop, I see it > on the shared folder. (I do a "ls" command with ssh directly on the server > to be sure). I can add, remove, edit file on the desktop and every thing are > OK. > > The problem come when I logout The window client do some sort of > synchronization of a local folder with the shared folder. For example, > C:\Documents and Seetings\admin\Desktop\ with > \\MyServer\profiles\admin\Desktop. I fact, it's not a synchronization, it's > just delete the shared folder and replace it by the content of the local > folder. The result is that every modification done on the desktop (that are > redirected) are lost at the logout.I believe that's how it's supposed to work. Purge the old profile and store the current one in its place. If you don't want it to be overwritten relocate it somewhere else.