[Samba] Login scripts based on group

Dean Landry landryd at bethany-ca.edu
Wed Nov 10 13:47:30 GMT 2004


Misty Stanley-Jones wrote:

>On Wednesday 10 November 2004 08:05, Simon Hobson wrote:
>  
>
>>Dean Landry wrote:
>>    
>>
>>>I have users that belong to several groups.  I want a logon script
>>>to be run for each of the groups to which a user belongs.  For
>>>example, when I logon, I want admin.bat, users.bat, and
>>>someothergroup.bat to run.  On Novell I used to use 'if Member of
>>>groupName...', but I don't know how to do this in Samba..
>>>      
>>>
>>Two ways :
>>
>>1) Use ifmember in the main login script to check for group
>>membership and call the appropriate scripts. ifmember is (IIRC)
>>downloadable from the Microsoft web site.
>>
>>2) Use the pre-exec facility of Samba to build a users login script
>>on the fly each time they connect to the netlogon share. Use %u
>>(again, IIRC) in the declaration of the login script parameter so
>>that each users uses their own script, then write a script (executed
>>on the host) that will build the login script (which of course can
>>use any information available to the host scripting language) and set
>>it as the pre-exec script for the share.
>>    
>>
>
>3.  Use Kixtart!  It's perfect, it works for all versions of Windows, it's 
>very easy, and you will be able to script things you haven't even thought of 
>yet.
>
>Misty
>
>  
>
I don't think I want to think of new things to do in a logon script!  
:)  ifmember is working beautifully!  Thanks Simon!

Dean


More information about the samba mailing list