iptables equiv. of ipchains -M -L
I used to use ipchains and i could type ipchains -M -L and get a list of outgoing connections through the NAT. Does anybody know if there is an equivalent command with iptables as I'm now using iptables and I'd still like to be able to display this info. Thanks, Alex Brett alex.brett@brettcomputers.co.uk
The following command should pause a job entered for one minute shouldn't it? lp -d B2 -o %f -o job-hold-until=00:01 %s At least thats from what i've read/been told and modified to suit, but rather than keep it for one minute it stays forever! It seems having a command like that is the only way to get CUP's one-job-per-user into effect, else they can just print as much as they want. a one minute delay on any job would seem fair too, as it gives chance for any repetitive clicking of the print button to be effectively not acknowledged. But where could i be going wrong with this command? Any suggestions? __________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer
--- Steve Palmer <lumpyhed@yahoo.com> wrote:
The following command should pause a job entered for one minute shouldn't it?
lp -d B2 -o %f -o job-hold-until=00:01 %s
Ummm, it would seem to be the case.
At least thats from what i've read/been told and modified to suit, but rather than keep it for one minute it stays forever!
Perhaps CUPS is unable to forward it to the print buffer? Maybe your printer is broken? LOL, I doubt that though.
It seems having a command like that is the only way to get CUP's one-job-per-user into effect, else they can just print as much as they want. a one minute delay on any job would seem fair too, as it gives chance for any repetitive clicking of the print button to be effectively not acknowledged. But where could i be going wrong with this command? Any suggestions?
I haven't used CUPS for a number of months, but where is that command being run? If you can escape to a shell, then you could try: sleep 60s && \ lp -d B2 -o %f %s assuming of course that "%f" and "%f" can be interpolated by the shell. HTH, -- Thomas Adam ===== Thomas Adam "The Linux Weekend Mechanic" -- www.linuxgazette.com __________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer
its being run by the 'print command' within samba, with the printcap as 'lpstat'. I'm not sure whether you can do multiple lines of commands though. I've been sodding around with this CUPS/Samba setup for months now it seems ^_^ --- Thomas Adam <thomas_adam16@yahoo.com> wrote: > --- Steve Palmer <lumpyhed@yahoo.com> wrote:
The following command should pause a job entered for one minute shouldn't it?
lp -d B2 -o %f -o job-hold-until=00:01 %s
Ummm, it would seem to be the case.
At least thats from what i've read/been told and modified to suit, but rather than keep it for one minute it stays forever!
Perhaps CUPS is unable to forward it to the print buffer? Maybe your printer is broken? LOL, I doubt that though.
It seems having a command like that is the only way to get CUP's one-job-per-user into effect, else they can just print as much as they want. a one minute delay on any job would seem fair too, as it gives chance for any repetitive clicking of the print button to be effectively not acknowledged. But where could i be going wrong with this command? Any suggestions?
I haven't used CUPS for a number of months, but where is that command being run? If you can escape to a shell, then you could try:
sleep 60s && \ lp -d B2 -o %f %s
assuming of course that "%f" and "%f" can be interpolated by the shell.
HTH,
-- Thomas Adam
===== Thomas Adam
"The Linux Weekend Mechanic" -- www.linuxgazette.com
__________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer
-- To unsubscribe, e-mail: suse-linux-uk-schools-unsubscribe@suse.com For additional commands, e-mail: suse-linux-uk-schools-help@suse.com
__________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer
--- Steve Palmer <lumpyhed@yahoo.com> wrote:
its being run by the 'print command' within samba, with the printcap as 'lpstat'. I'm not sure whether you can do multiple lines of commands though. I've been sodding around with this CUPS/Samba setup for months now it seems ^_^
Ah..... "lpstat" is a shell program. Therefore, what you could do is be clever and do something like: alias lpstat_sleep='sleep 60s && lpstat' in your "/etc/bash_profile" file. Then source it . /etc/bash_profile Then change your SAMBA definition so that "printcap" now reads equal to "lpstat_alias". This'll then give you your 60 sec. delay. You'll have to modify the alias to suit your needs though. I'm sure there is an easier way, but this is perhaps a suitable fix for now :) HTH, -- Thomas Adam ===== Thomas Adam "The Linux Weekend Mechanic" -- www.linuxgazette.com __________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer
oooooo a pool of knowledge! ^_^ Now I have to say i have no prior knowledge of this alias setup - for starters i have no 'bash_profile' folder, but i assume the profile.d is the place i want to be? I can enter the alias command, and it appears to work but no csh/sh file is created anywhere, so i had a look at the mc.csh which is one for midnight commander and redid and resaved it as the alias file i want. Theres a sh file for it too, though i don't know whether thats applicable. Then you 'source' it? it didn't appear to do much either ;) I assume in the samba.conf it goes 'printcap name = lpstat_sleep'? I added the changes for the print commands too. Its printing, but theres no printing delay or prevention of multiple jobs from one user. I did a 'man alias' but all i got was a complete listing of bash arguements :( --- Thomas Adam <thomas_adam16@yahoo.com> wrote: > --- Steve Palmer <lumpyhed@yahoo.com> wrote:
its being run by the 'print command' within samba, with the printcap as 'lpstat'. I'm not sure whether you can do multiple lines of commands though. I've been sodding around with this CUPS/Samba setup for months now it seems ^_^
Ah.....
"lpstat" is a shell program. Therefore, what you could do is be clever and do something like:
alias lpstat_sleep='sleep 60s && lpstat'
in your "/etc/bash_profile" file.
Then source it
. /etc/bash_profile
Then change your SAMBA definition so that "printcap" now reads equal to "lpstat_alias". This'll then give you your 60 sec. delay.
You'll have to modify the alias to suit your needs though. I'm sure there is an easier way, but this is perhaps a suitable fix for now :)
HTH,
-- Thomas Adam
===== Thomas Adam
"The Linux Weekend Mechanic" -- www.linuxgazette.com
__________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer
__________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer
--- Steve Palmer <lumpyhed@yahoo.com> wrote:
oooooo a pool of knowledge! ^_^
Heh :)
Now I have to say i have no prior knowledge of this alias setup - for starters i have no 'bash_profile' folder, but i assume the profile.d is the place i want to be?
Ah, right. Which distribution are you using?? If you are using SuSE, then create (if not already) a file called: "/etc/profile.local" In that, add exactly as before the alias as written, and then save the file, and type: source /etc/profile.local (all of this ought to be carried out as user "root")
I can enter the alias command, and it appears to work but no csh/sh file is created anywhere, so i had a look at the mc.csh which is one for midnight commander and redid and resaved it as the alias file i want. Theres a sh file for it too, though i don't know whether thats applicable.
Ahh, you're looking in the wrong place, my friend. Follow my instructions as above :)
Then you 'source' it? it didn't appear to do much either ;) I assume in the samba.conf it goes 'printcap name = lpstat_sleep'?
Sourcing a file does nothing visible except re-export environment variable.....and it is a good thing :) I added the changes for the
print commands too. Its printing, but theres no printing delay or prevention of multiple jobs from one user.
Probably because the alias is not working.
I did a 'man alias' but all i got was a complete listing of bash arguements :(
That's because "alias" is a shell bultin and as such is in the: "man bashbuiltins" Alternatively, you can run: help alias from the command-line instead. HTH, let me know how things get on, -- Thomas Adam :)
--- Thomas Adam <thomas_adam16@yahoo.com> wrote: > --- Steve Palmer <lumpyhed@yahoo.com> wrote:
its being run by the 'print command' within samba, with the printcap as 'lpstat'. I'm not sure whether you can do multiple lines of commands though.
I've
been sodding around with this CUPS/Samba setup for months now it seems ^_^
Ah.....
"lpstat" is a shell program. Therefore, what you could do is be clever and do something like:
alias lpstat_sleep='sleep 60s && lpstat'
in your "/etc/bash_profile" file.
Then source it
. /etc/bash_profile
Then change your SAMBA definition so that "printcap" now reads equal to "lpstat_alias". This'll then give you your 60 sec. delay.
You'll have to modify the alias to suit your needs though. I'm sure there is an easier way, but this is perhaps a suitable fix for now :)
HTH,
-- Thomas Adam
===== Thomas Adam
"The Linux Weekend Mechanic" -- www.linuxgazette.com
__________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer
__________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer
===== Thomas Adam "The Linux Weekend Mechanic" -- www.linuxgazette.com __________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer
*smacks head against table very hard x10* What a n00b i am! i thought it was directory *not* a file. RTFM springs to mind ;) oh and some glasses too! Ok i've added profile.local file, inserted me alias command, sourced it then made sure samba had the correct settings and restarted both samba and cups services. Unfortunately its still not retaining jobs and multiple jobs still get through :/ I noticed that if you type the exact contents of the alias as a command it accepts it, then sits about forcing you to do a ctrl&c to get out of it. That wouldn't have any bearing would it? __________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer
On Wed, Apr 02, 2003 at 02:16:07PM +0100, Steve Palmer wrote:
*smacks head against table very hard x10* What a n00b i am! i thought it was directory *not* a file. RTFM springs to mind ;) oh and some glasses too!
Ok i've added profile.local file, inserted me alias command, sourced it then made sure samba had the correct settings and restarted both samba and cups services. Unfortunately its still not retaining jobs and multiple jobs still get through :/
That's because it only affects when lpr is called from the shell. To take effect in samba you'd need to modify or add a "print command" line in your smb.conf. -- Mark Evans St. Peter's CofE High School Phone: +44 1392 204764 X109 Fax: +44 1392 204763
Well just to give you a little sample of me samba.conf: [B2] printer = B2 printer driver location = /usr/local/drivers printable = yes printer driver = HP LaserJet 4 print command = lp -d B2 -o %f %s Yes i know some of them are obselete as i will soon replace them with the Imprints method. There are multiple entries like this for each printer on-site. The Global part goes: [global] path = /var/tmp wins server = 192.168.3.1 auto services = global printing = cups dns proxy = No printer driver file = /usr/bin postscript = yes null passwords = yes character set = ISO8859-15 socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192 keepalive = 30 printcap name = lpstat_sleep max log size = 200 password level = 8 interfaces = 192.168.3.8/255.255.252.0 username level = 8 writeable = no which i believe is suffiecent for the task? --- Mark Evans <mpe@st-peters-high.devon.sch.uk> wrote: > On Wed, Apr 02, 2003 at 02:16:07PM +0100, Steve
Palmer wrote:
*smacks head against table very hard x10* What a n00b i am! i thought it was directory *not* a file. RTFM springs to mind ;) oh and some glasses too!
Ok i've added profile.local file, inserted me alias command, sourced it then made sure samba had the correct settings and restarted both samba and cups services. Unfortunately its still not retaining jobs and multiple jobs still get through :/
That's because it only affects when lpr is called from the shell. To take effect in samba you'd need to modify or add a "print command" line in your smb.conf.
-- Mark Evans St. Peter's CofE High School Phone: +44 1392 204764 X109 Fax: +44 1392 204763
-- To unsubscribe, e-mail: suse-linux-uk-schools-unsubscribe@suse.com For additional commands, e-mail: suse-linux-uk-schools-help@suse.com
__________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer
--- Mark Evans <mpe@st-peters-high.devon.sch.uk> wrote: > On Wed, Apr 02, 2003 at 02:16:07PM +0100, Steve
Palmer wrote:
*smacks head against table very hard x10* What a n00b i am! i thought it was directory *not* a file. RTFM springs to mind ;) oh and some glasses too!
Sorry Steve....I guess I should have told you that :)
Ok i've added profile.local file, inserted me alias command, sourced it then made sure samba had the correct settings and restarted both samba and cups services. Unfortunately its still not retaining jobs and multiple jobs still get through :/
Ah, you probably didn't update your "/etc/smb.conf" file...(see below)
That's because it only affects when lpr is called from the shell. To take effect in samba you'd need to modify or add a "print command" line in your smb.conf.
Then restart samba :) It ought to work then. -- Thomas Adam ===== Thomas Adam "The Linux Weekend Mechanic" -- www.linuxgazette.com __________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer
participants (4)
-
Alex Brett
-
Mark Evans
-
Steve Palmer
-
Thomas Adam