Hi, after updating our printserver from Samba V2.0.6 to V2.2.7 I encountered the following problem. Samba does not execute the (root) pre- and postexec within the printers section. If you are using these command in another section everything works fine. Does anybody know if these command are not supported in the printers section anymore? smb.conf: [global] ... load printers = yes lpq cache time = 30 print command = lpr -r -P%p %s printcap name = /etc/printcap printing = bsd ... [printers] comment = Alle Drucker browseable = no printable = yes public = yes path = /var/spool/samba/%d create mode = 0700 lpq command = lpq -P%p root preexec = mkdir -p /var/spool/samba/%d; chmod 700 /var/spool/samba/%d; chown %u: /var/spool/samba/%d root postexec = rm -rf /var/spool/samba/%d BTW how can I check execution of preexec-commands? I didn't find entry in %m.log ... :-( Regards,> Tobias Gerndt >
To check executation, put an echo command in the preexec, like: echo I ran the preexec `date` > /tmp/junk>BTW how can I check execution of preexec-commands? I didn't find entry in> %m.log ... :-(
I have the same experience. I am using Version 2.2.1a. When I turned a share from a file share to a printing share, the preexec stopped. [Z32] printable = yes <---added printing = lprng <--added comment = Printer Z32 path = /tmp exec = echo %U has logged onto Z32 | mutt -s "Log report" joel@hammershome.com Joel On Fri, Dec 06, 2002 at 09:02:24PM +0100, Tobias.Gerndt@EnBW.com wrote:> I already tried this. In every section the preexec command is executed only > within printers there was no action. > In Samba V2.0.6 it worked, in Samba V2.2.x not! > > --- > Tobias Gerndt > > > > -----Original Message----- > > From: Joel Hammer [mailto:Joel@HammersHome.com] > > Sent: Freitag, 6. Dezember 2002 20:59 > > To: Tobias.Gerndt@EnBW.com; samba@lists.samba.org > > Subject: Re: [Samba] pre-/postexec in printers-section > > > > > > To check executation, put an echo command in the preexec, > > like: echo I ran the preexec `date` > /tmp/junk > > > > > BTW how can I check execution of preexec-commands? I didn't > > find entry in > > > %m.log ... :-( > >
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 6 Dec 2002, Joel Hammer wrote:> I have the same experience. I am using Version 2.2.1a. > When I turned a share from a file share to a printing share, the > preexec stopped. > > [Z32] > printable = yes <---added > printing = lprng <--added > comment = Printer Z32 > path = /tmp > exec = echo %U has logged onto Z32 | mutt -s "Log report" joel@hammershome.comAre you printing from Win9x or NT+ ? If the latter, it is because the printing is done via RPC (never actually connects to \\server\Z32). cheers, jerry ---------------------------------------------------------------------- Hewlett-Packard ------------------------- http://www.hp.com SAMBA Team ---------------------- http://www.samba.org GnuPG Key ---- http://www.plainjoe.org/gpg_public.asc ISBN 0-672-32269-2 "SAMS Teach Yourself Samba in 24 Hours" 2ed "You can never go home again, Oatman, but I guess you can shop there." --John Cusack - "Grosse Point Blank" (1997) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQE9+h37IR7qMdg1EfYRAlFXAJ4htPtgkE0ZKSHExBqG8DCsV+HdqgCeKKI3 khIglUv/j1sqloBdLw0Bj6E=RZza -----END PGP SIGNATURE-----