[Samba] Samba 3.0 and XP roaming profiles

Dennis McLeod dmcleod at foranyauto.com
Wed Apr 11 20:46:37 GMT 2007

Here's my logon script (edited... This is just for mapping drives. I have
others that get called from here also.)(XP clients. Domain Members)
The ifmember part is optional. It checks for group membership and only maps
the drives that the user needs, based on his group membership.
I have a mixed environment so far. Migrating from a peer to peer workgroup
to a domain. Machines that are part of the domain run this when a user logs
No roaming profiles for me, though. Public is read only, so everyone gets
that mapped.
Ifmember.exe is part of the W2K (or later) server resource kit. Ifmember.exe
only exists in the netlogon share.

net time \\server /set /yes

\\server\netlogon\ifmember "domainname\acctsdep"
if not errorlevel 1 goto parts
net use j: \\server\accounts

\\server\netlogon\ifmember "domainname\partsdept"
if not errorlevel 1 goto service
net use k: \\server\parts

\\server\netlogon\ifmember "domainname\servicedept"
if not errorlevel 1 goto sales
net use s: \\server\service

\\server\netlogon\ifmember "domainname\salesdept"
if not errorlevel 1 goto hr
net use l: \\server\sales

\\server\netlogon\ifmember "domainname\hr"
if not errorlevel 1 goto public
net use m: \\server\hr

net use p: \\server\public

It's named logon.bat (you can name it whatever you want.)
It's in /var/lib/samba/netlogon/scripts
My smb.conf says:

logon script = scripts\logon.bat (this has to match what you named the

comment = Network Logon Service 
path = /var/lib/samba/netlogon      (path=/var/samba/netlogon/%U would have
a subfolder with each user name, and you could build a script for each user)
public = no
writeable = no
browsable = no

Hope this helps.

-----Original Message-----
From: samba-bounces+dmcleod=foranyauto.com at lists.samba.org
[mailto:samba-bounces+dmcleod=foranyauto.com at lists.samba.org] On Behalf Of
Sent: Wednesday, April 11, 2007 1:06 PM
To: samba at lists.samba.org
Subject: Re: [Samba] Samba 3.0 and XP roaming profiles

Thanks for the suggestion.
I havn't tried login scripts. I can create a login script and put it under
the base netlogon path which is /var/samba/netlogon in my case. But my
question is what shoudl be the name of this script so that every profile can
grab it. Moreover what permissions should be set on it so that every profile
can run it.
Also regarding my logon script, my smb.conf fille says like this:

logon script = scripts\login.bat

path= /var/samba/netlogon/%U

Actually this configuration was designed by an earlier admin and I dont know
why he put that "script\login.bat". I dont see any directory called scripts
on the server. My question is, that what should I put here so that all my
profiles can catch this script and what permissions should be set for the

Thanks in advance,


View this message in context:
Sent from the Samba - General mailing list archive at Nabble.com.

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

More information about the samba mailing list