[Samba] Folder Redirection, Roaming Profiles and Working Offline

Richard Green richard at atomic-x.co.uk
Thu Dec 9 00:31:34 GMT 2004


Hi,

I have been trying to use samba for a while as a way to have an 
identical desktop/startmenu/profile/favourites/etc on multiple PCs. 
Samba is setup as the PDC and I can join the domain and login.

The problems started firstly when I wanted to have some sort of caching 
and also logon concurrently to different pcs with the same user. The 
main problem being that whichever computer I log off last gets all the 
changes saved and the first to log off looses all its changes. So I 
decided to read into Folder Redirection and followed the article at 
http://isg.ee.ethz.ch/tools/realmen/det/skel.en.html I changed the 
registry keys to make as may files possible redirected to a server share 
leaving just the profile on the profile share (by the way I am running 
windows XP on both workstations) Now when I try and logon having moved 
the rest of my profile to a mapped home drive I get the following error:

Windows cannot load the user's profile but has logged you on with the 
default profile for the system.

DETAIL - Incorrect function.

Click on OK and it loads my profile from the server, no error in the 
samba log files or anything, Is there an obvious cure?

The next problem is that because its all accessing the profile directly 
from the server I keep getting helpful windows baloons telling me 
"Delayed Write Fail" and that my mail file or whatever has been lost.

One of my two computers is a laptop and is obviously used away from my 
network so I use working offline- well attempt to, When it manages to 
lock the files and doesn't decide to go offline because it can't 
syncronise. Again is there anything that i'm doing wrong?

Lastly is this the best approach to take or does anyone have any other 
suggestions? I have a debian server running samba and two winXP 
computers; one laptop and one desktop. I basically want to keep the 
computers with the same desktop/information/bookmarks etc on them and 
also have the laptop working away from the home server.

I have enclosed my smb.conf file at the bottom of this message. Thankyou 
for all your help and sorry about asking all these questions but I have 
been attempting and failing to get a working solution for several months :(

PS I am running Version 3.0.8-Debian Samba

Thanks!
Richard

smb.conf:
# Global parameters
[global]
         workgroup = HOMENET
         netbios name = XEBIAN
         map to guest = Bad User
         passdb backend = tdbsam, guest
         pam password change = Yes
         unix password sync = Yes
         name resolve order = wins lmhosts bcast
         time server = Yes
         add user script = /usr/sbin/useradd -m %u
         delete user script = /usr/sbin/userdel -r %u
         add group script = /usr/sbin/groupadd %g
         delete group script = /usr/sbin/groupdel %g
         add user to group script = /usr/sbin/usermod -G %g %u
         add machine script = /usr/sbin/useradd -s /bin/false -d 
/dev/null %u
         logon script = %ULogon.bat
         logon path = \\%L\profiles\%U
         logon drive = H:
         logon home = \\%L\%U
         domain logons = Yes
         os level = 35
         preferred master = Yes
         domain master = Yes
         wins proxy = Yes
         wins support = Yes
         idmap uid = 15000-20000
         idmap gid = 15000-20000
         admin users = richard, @ntadmins
         hosts allow = 10.0.0., EXCEPT 10.0.0.1, 127.
         map acl inherit = Yes
         Log file = /var/log/samba/log.%m
         max log size = 50
         log level = 2
         hide files = /desktop.ini/ntuser.ini/NTUSER.*/
         server string = %h server (Samba %v)


[netlogon]
         path = /var/lib/samba/netlogon
         write list = @ntadmins, ntadmin

[Profiles]
         path = /var/lib/samba/profiles
         valid users = %U
         force user = %U
         read only = No
         create mask = 0700
         directory mask = 0700
         guest ok = Yes
         profile acls = Yes
         browseable = No
         csc policy = disable
         root preexec = PROFILE=/var/lib/samba/profiles/%U; if [ ! -e 
$PROFILE ]; then mkdir -pm700 $PROFILE; chown %u:%g $PROFILE;fi

[homes]
         path = /home/%U/windows
         comment = Home Directories
         valid users = %S
         read only = No
         force create mode = 0600
         force directory mode = 0700
         veto files = 
/Maildir/.bash_history/.bash*/.ssh/.spamassassin/.procmail$
         hide files = 
/Maildir/.*/desktop.ini/ntuser.ini/NTUSER.*/hpothb07.dat/Thumbs.db
         browseable = No
         dos filetimes = Yes
         root preexec = WinHome=/home/%u/windows; if [ ! -e $WinHome ]; 
then mkdir -pm700 $WinHome; chown %u:%g $WinHome;fi

[media]
         comment = music and video files
         path = /home/samba/media
         dos filetimes = Yes
         write list = @ntadmins, ntadmin

[docs]
         comment = linux documents folder
         path = /usr/share/doc
         dos filetimes = Yes
         read only = Yes

[pub]
         comment = Public directory
         path = /home/samba/pub
         read only = No
         create mask = 0777
         guest ok = Yes
         dos filetimes = Yes

[programs]
         comment = Programs
         path = /home/samba/programs
         write list = @ntadmins
         guest ok = Yes
         dos filetimes = Yes

[Win2k]
         comment = Windows 2000 Custom Installation Directory
         path = /home/samba/win2kinstall
         write list = @ntadmins
         guest ok = Yes
         dos filetimes = Yes

[WinXP]
         comment = Windows XP Setup Source
         path = /home/samba/winxpinstall
         write list = @ntadmins
         guest ok = Yes
         dos filetimes = Yes

[files]
         comment = Shared Files
         path = /home/samba/files
         read only = No
         dos filetimes = yes
         valid users = @ntadmins



More information about the samba mailing list