samba-users August 2010 archive
Main Archive Page > Month Archives  > samba-users archives
samba-users: [Samba] Roaming profiles shared between WinXP and W

[Samba] Roaming profiles shared between WinXP and Win7

From: German Molano <gmolano_at_nospam>
Date: Thu Aug 05 2010 - 23:02:13 GMT
To: samba@lists.samba.org

Hi there I am setting up a PDC with Centos 5 + Samba 3.5.4 + Openldap
with Roaming profiles using kixstart tools to mount shared folder and
modifing some registry entries on windows workstations,
The Roaming profiles works fine between Win2000 and WinXP. but when I
tried to join a Win7 or Vista workstations i get mixed errors. Sometimes
the profiles loads sometimes not, or loads badly misconfigured icons, etc.

This is my config:

[homes]
    root preexec = /root/bin/auto-create-home-samba.sh %u
    comment = Home Directories
    valid users = %u
    read only = No
    browseable = No

-- auto-create-home-samba.sh --
#!/bin/bash
if [ ! -e /home/$1 ]; then
        mkdir /home/$1
        chown $1:"Domain Users" /home/$1
        chmod 700 /home/$1
fi
exit 0
-- auto-create-home-samba.sh --

[profiles]
    root preexec = /root/bin/samba-profile-fix.sh %u
    comment = Network Profiles Share
    path = /var/lib/samba/profiles
    read only = No
    profile acls = Yes
    create mode = 0600
    directory mode = 0700
    writable = yes
    browseable = No
    store dos attributes = Yes

-- samba-profile-fix.sh --
#!/bin/bash
if [ ! -e /var/lib/samba/profiles/$1.V2 ]; then
        ln -s /var/lib/samba/profiles/$1 /var/lib/samba/profiles/$1.V2
        if [ ! -e /var/lib/samba/profiles/$1 ]; then
                mkdir /var/lib/samba/profiles/$1
                chown -R $1:"Domain Users" /var/lib/samba/profiles/$1
                setfacl -d -m u:$1:rwx /var/lib/samba/profiles/$1
                chmod 700 /var/lib/samba/profiles/$1
        fi
fi
exit 0
-- samba-profile-fix.sh --

[netlogon]
    comment = Network Logon Service
    path = /var/lib/samba/netlogon
    guest ok = Yes
    locking = No
    write list = admin, Administrador
-- logon.kix --
BREAK OFF
$ = SETTITLE("Domain Login")
BIG
COLOR G/N
?@DOMAIN
?
SMALL
COLOR W/N
?@TIME " - " @WKSTA " - " @USERID
?"Do not close this window, it will automatically close"
?

        SetTime "\\PDC"

        USE Z: "\\PDC\GENERAL"

        USE P: "\\PDC\PUBLIO)"
        $AutoUpdateServer = "http://192.168.0.3/selfupdate"
        
WriteValue("HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\ThemeManager",
"DllName", "%SystemRoot%\Resources\themes\Windows Classic.theme","REG_SZ")
        
WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User
Shell Folders", "Personal", "%USERPROFILE%\Mis documentos", "REG_EXPAND_SZ")
        
WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User
Shell Folders", "Desktop", "%USERPROFILE%\Escritorio", "REG_EXPAND_SZ")
        
WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User
Shell Folders", "Favorites", "%USERPROFILE%\Favoritos", "REG_EXPAND_SZ")
        
ExistKey("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsUpdate")
        If @ERROR <> 0
            
AddKey("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsUpdate")
        EndIf
        
ExistKey("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsUpdate")
        If $AutoUpdateServer<>""
        If @ERROR <> 0
            
WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate",
"WUServer",$AutoUpdateServer,"REG_SZ")
            
WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate",
"WUStatusServer",$AutoUpdateServer,"REG_SZ")
        EndIf
        EndIf
--logon.kix--

The question how i can maintain the Windows configuration folders
between Windows OSes without messing around too much with the Windows
registry?.
Its possible to detect which platform logs in and make it store some
config files like NTUSER.dat and others to some specified location
inside the profile so it doesn't overlaps between platforms ?

Thanks for your help

German

-- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba