[Samba] group based login scripts other thatn primary(was ifmember.exe)

John Benedetto jbenedet at unm.edu
Thu Mar 21 09:40:03 GMT 2002


--On Thursday, March 21, 2002 9:18 AM -0600 Barry Smoke 
<barry at arhosting.com> wrote:

> This is one of the only drawbacks I've found so far, is that you can't
> do log-in scripts based on a person's membership to group other than
> their primary group.
>
> Or did I miss something?

Yes.

There are a number of resources detailing how to do this... here is one 
online: http://www.phonax.com/fileservers/index.shtml and Richard Sharpe's 
Que Special Edition Using Samba book also has details.

In a nutshell:  do a root pre-exec to execute a script - be it Perl, or 
shell, or whatever your preference.  That script dynamically builds a logon 
script, on the fly, for the user.  One of the things you can do is have the 
script walk through the /etc/group file, and pull 'secondary' memberships, 
for logging in.  That batch file is then sent down to the client during 
logon, and executed on the client side.

- john




More information about the samba mailing list