> Date: Thu, 27 Jul 2000 08:25:44 -0400
> From: David Collier-Brown <David.Collier-Brown@canada.sun.com>
> To: Luc Lalonde <llalonde@gre.ulaval.ca>, samba@samba.org
> Subject: Re: conditional logon scripts
> Message-ID: <39802A48.CD84F4C6@canada.sun.com>
> MIME-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> You wrote:
> [...] would like to know if it is possible
> | to setup Samba to check if a %U.bat exists for user %U. If no such
> batch
> | file exists, default.bat should be used. This would less of a pain
> of
> | creating a seperate batch file for a user that only requires generic
> logon
> | scripts.
>
> You can do the equivalent with (root) preexec,
> by looking to see if user fred has a fred.bat,
> and putting in a link if not.
>
> Of course, the preexec will run every time,
> causing an initial delay when connecting to
> the share.
>
> --dave
> --
> David Collier-Brown, | Always do right. This will gratify some people
> 185 Ellerslie Ave., | and astonish the rest. -- Mark Twain
> Willowdale, Ontario | //www.oreilly.com/catalog/samba/author.html
> Work: (905) 415-2849 Home: (416) 223-8968 Email: davecb@canada.sun.com
>
I have a script similar to what your looking for, but its written in
perl. It's run using "root preexec" in a netlogon share and is
executed
when a MS windows user logs on.
I have two different groups of users that need different logon scripts
depending on which unix group they belong to.
Before it does anything, checks to see if the .bat file already exists
so it won't overwrite any customizations done by the user.
I can send you this if your interested.
--Dennis