Is it a bug or a feature?

Andrew Bartlett abartlet at samba.org
Tue Jul 2 23:31:01 GMT 2002


Bogdan Iamandei wrote:
> 
>         I have a little question to the list here. I have Samba 2.2.4
> running on a production swerver. All is nice and fine, as long as new
> users don't need to connect. The setup is done in such way that when a
> new user connects - if their home directory does not exist - it will be
> created on the spot by a script specified with "root preexec" in the
> [homes] share.
> 
> Now, with the very old version of samba - this worked fine. However,
> with the one I am now on - it seems that if the home dir does not exist
> the user gets an error message - and the preexec directive never gets
> executed.
> 
> The current work around is to have the home directory created when the
> user maps the [netlogon] share and be done with it. However - this does
> not protect them against - say - attempting to map their home directory
> from a smbclient session (which does not go through mapping [netlogon]
> first).
> 
> So - to cut a long story short:
> 
> Is it normal for "preexec" directives to be skipped if the share they're
> associated with does not exist in the first place?

Yes.  Look into pam_mkhomedir if you need this kind of thing.  I'll
eventually write a 'session exec' feature, but have not got around to it
yet.

-- 
Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net




More information about the samba-technical mailing list