[Samba] A (maybe)_ easy solution to global login script for group checking

Amadeus poff at sixbit.org
Sun May 23 02:35:54 GMT 2004


While searching the archives and googling for :

-login script to map drives according to group membership

I saw lots of complicated solutions (on-the-fly scripts, group directories) 
etc. but the following works very well for me:

I downloade dthe ifmember.exe from the microsoft website, and stuck it in 
the netlogon directory (not the scripts directory)


Then the script is:

@echo off

ifmember "DOMAIN\group1"

if not errorlevel 1 goto group2

net use r: \\SERVER\group1files

ifmember "DOMAIN\group2"

if not errorlevel 1 goto group3

net use s: \\SERVER\group2files



So according toi group the network drives get mapped. It's all in one login 
script and makes things easy!

I couldn't find this in the archives so I thought I'd share this.

What's nice is that you have the ifmember only on the server.

Hope it's not just repeating something I missed somewhere,


poff at sixbit.org
SDF Public Access UNIX System - http://sdf.lonestar.org

More information about the samba mailing list