Michels, Gustavo [EES/BR] gustavo.michels at emersonenergy.com
Thu Sep 27 08:02:03 GMT 2001


There is an MS application called IFMEMBER.EXE (available in NT Resource Kit
I guess) that will do that job for you. You put it in the netlogon share and
add entries to the logon script. Here's an example:

%logonserver%\netlogon\ifmember "domain group 1"
if not errorlevel 1 goto a
net use x: \\server\share
goto quit

%logonserver%\netlogon\ifmember "domain group 2"
if not errorlevel 1 goto b
net use x: \\server\share
goto quit

%logonserver%\netlogon\ifmember "domain group 3"
if not errorlevel 1 goto quit
net use x: \\server\share


And so on... I am not sure if this will work if your PDC is a Samba server.


> -----Original Message-----
> From: Richard Smart [mailto:rsmart at netaccess.co.nz]
> Sent: quinta-feira, 27 de setembro de 2001 10:22
> To: samba at lists.samba.org
> I created a workaround for this for a school network (using 
> RH6.2, Samba
> 2.0.7 & Win9x clients)
> For the netlogon share I used a preexec script that created a 
> temporary
> textfile in the homes share
> groups > grouplist.txt
> I used the netlogon share because it was always accessed when 
> a user logged on
> A postexec script deleted the grouplist.txt file afterwards
> I then created a small (dos) exe program that ran in the 
> login script and
> interrogated the grouplist.txt file for specific groups as 
> needed and used
> return values to indicate true or false. The login script 
> used lines such as 
> (dos exe) "Groupname beingchecked"
> IF ERRORLEVEL !=1 GOTO ... to provide the conditional jumps
> While not particularly elegant it works reliably (and has for 
> the last 8
> months). If it helps I can send more detail including copies 
> of the dos exe
> source code etc etc. If there are better (or more elegant) 
> ways of doing
> this I would be interested as well :-)
> Richard Smart
> At 16:06 26/09/01 -0500, you wrote:
> >I have seen these types of login scripts on novell servers 
> before, but it is
> >a dos command....
> >is there any way to get this type of script to work under samba?
> >How does dos check to see what groups a logged in user is a 
> member of?
> >What Variables if any does samba pass to the win9x client to 
> set these?
> >
> >Thanks,
> >Barry Smoke
> >Network Administrator
> >Bryant Public Schools
> >
> >
> >-- 
> >To unsubscribe from this list go to the following URL and read the
> >instructions:  http://lists.samba.org/mailman/listinfo/samba
> >
> >
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba

More information about the samba mailing list