Leander Schäfer
2016-Oct-30 13:10 UTC
[Samba] Auto Create Home - shadow_copy2 and root preexec
Hi, I make use of shadow_copy2 and root preexec. The vfs root preexec is responsible to auto create home directories which initially don't exist. The script behind it is well tested and works perfectly. Unfortunaltely shadow_copy2 seems to be called before root preexec and fails due to the missing ZFS home share which causes the session to fail completely before root preexec even has a chance to create the home. So the question ist: how can I enforce root preexec before shadow_copy2 is going to be called? Thanks in advance Best regards Leander
Rowland Penny
2016-Oct-30 14:05 UTC
[Samba] Auto Create Home - shadow_copy2 and root preexec
On Sun, 30 Oct 2016 14:10:25 +0100 Leander Schäfer via samba <samba at lists.samba.org> wrote:> Hi, > > I make use of shadow_copy2 and root preexec. The vfs root preexec is > responsible to auto create home directories which initially don't > exist. The script behind it is well tested and works perfectly. > Unfortunaltely shadow_copy2 seems to be called before root preexec > and fails due to the missing ZFS home share which causes the session > to fail completely before root preexec even has a chance to create > the home. > > So the question ist: how can I enforce root preexec before > shadow_copy2 is going to be called? > > Thanks in advance > Best regards > Leander >A bit more info might help ;-) What is obvious to you , certainly isn't to us. What are you connecting to ? and from what ? Posting your (sanitized) smb.conf will help. Rowland
Andrew Bartlett
2016-Oct-30 18:30 UTC
[Samba] Auto Create Home - shadow_copy2 and root preexec
On Sun, 2016-10-30 at 14:10 +0100, Leander Schäfer via samba wrote:> Hi, > > I make use of shadow_copy2 and root preexec. The vfs root preexec is > responsible to auto create home directories which initially don't > exist. > The script behind it is well tested and works perfectly. > Unfortunaltely > shadow_copy2 seems to be called before root preexec and fails due to > the > missing ZFS home share which causes the session to fail completely > before root preexec even has a chance to create the home. > > So the question ist: how can I enforce root preexec before > shadow_copy2 > is going to be called?Perhaps get in even earlier with pam_mkhomedir, if it is still around? If you run Samba with 'obey pam restrictions' it should call it as a session module before any of the VFS modules get a go. Andrew Bartlett -- Andrew Bartlett http://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
Rowland Penny
2016-Oct-30 18:54 UTC
[Samba] Auto Create Home - shadow_copy2 and root preexec
On Mon, 31 Oct 2016 07:30:24 +1300 Andrew Bartlett via samba <samba at lists.samba.org> wrote:> On Sun, 2016-10-30 at 14:10 +0100, Leander Schäfer via samba wrote: > > Hi, > > > > I make use of shadow_copy2 and root preexec. The vfs root preexec > > is responsible to auto create home directories which initially don't > > exist. > > The script behind it is well tested and works perfectly. > > Unfortunaltely > > shadow_copy2 seems to be called before root preexec and fails due to > > the > > missing ZFS home share which causes the session to fail completely > > before root preexec even has a chance to create the home. > > > > So the question ist: how can I enforce root preexec before > > shadow_copy2 > > is going to be called? > > Perhaps get in even earlier with pam_mkhomedir, if it is still around? > > If you run Samba with 'obey pam restrictions' it should call it as a > session module before any of the VFS modules get a go. > > Andrew Bartlett > > -- > Andrew Bartlett http://samba.org/~abartlet/ > Authentication Developer, Samba Team http://samba.org > Samba Developer, Catalyst IT > http://catalyst.net.nz/services/samba > >Yes, it is still around, on debian at least, just run: echo "session required pam_mkhomedir.so skel=/etc/skel/ umask=0022" >> /etc/pam.d/common-account Rowland
Jeremy Allison
2016-Nov-01 22:05 UTC
[Samba] Auto Create Home - shadow_copy2 and root preexec
On Sun, Oct 30, 2016 at 02:10:25PM +0100, Leander Schäfer via samba wrote:> Hi, > > I make use of shadow_copy2 and root preexec. The vfs root preexec is > responsible to auto create home directories which initially don't > exist. The script behind it is well tested and works perfectly. > Unfortunaltely shadow_copy2 seems to be called before root preexec > and fails due to the missing ZFS home share which causes the session > to fail completely before root preexec even has a chance to create > the home. > > So the question ist: how can I enforce root preexec before > shadow_copy2 is going to be called?Hmmm. The 'connect' call for VFS modules always has to be called before 'root preexec' can be done. Is this the problem ?