Sitovy tisk

Uvíra Martin MartinU na IFTPROGRES.CZ
Úterý Říjen 9 11:36:13 CEST 2001


Dobrý den

pred nedavnem jsem do teto konference vznasel dotaz, ale nikdo me tenkrat
neodpovedel.
Proto vznasim tento dotaz jeste jednou s doplnenymi poznatky.

Mam stanici s RedHat 7.1 ze ktere se pokousim tisknout na tiskarnu
pripojenou k serveru
NT4.0, lec bezuspesne. Podotykam, ze vsechny mize uvedene cesty a soubory
jsou skutecne.

Muj printcap

HP6P:\
        :sh:\
        :ml=0:\
        :mx=0:\
        :sd=/var/spool/lpd/HP6P:\
        :lp=|/usr/share/printconf/smbprint:\
        :lpd_bounce=true:\
        :if=/usr/share/printconf/mf_wrapper:

smbprint

eval acct_file=\$$#
spool_dir=`dirname $acct_file`
config_file=$spool_dir/.config

eval `cat $config_file`
 
share=`echo $share | sed "s/[\]/\//g"`
 
if [ "$user" != "" ]; then
   usercmd="-U"
else
   usercmd=""
fi
 
if [ "$workgroup" != "" ]; then
   workgroupcmd="-W"
else
   workgroupcmd=""
fi
 
if [ "$translate" = "yes" ]; then
 command="translate ; print -"
else
 command="print -"
fi
echo $share $password $translate $x_command > /tmp/smbprint.log
 
cat | /usr/bin/smbclient "$share" "$password" -E ${hostip:+-I} \
     $hostip -N -P $usercmd "$user" $workgroupcmd "$workgroup" \
     -c "$command" 2>/tmp/vys

Zaver ze status.HP6P

IF filter 'mf_wrapper' filter msg - 'closing *main::KID3' at
2001-10-09-11:18:59.287 ## A=<NULL> number=126 process=1174
IF filter 'mf_wrapper' filter msg - 'closed *main::KID3' at
2001-10-09-11:18:59.862 ## A=<NULL> number=126 process=1174
IF filter 'mf_wrapper' filter msg - 'error closing *main::STDOUT at
/usr/share/printconf/foomatic/mfomatic line 563, <KID4_IN> line 755.' at
2001-10-09-11:19:09.928 ## A=<NULL> number=126 process=1174
IF filter 'mf_wrapper' filter finished at 2001-10-09-11:19:09.929 ##
A=<NULL> number=126 process=1174
printing finished at 2001-10-09-11:19:09.929 ## A=<NULL> number=126
process=1174
LP filter msg - 'cat: ./.config: No such file or directory' at
2001-10-09-11:19:09.930 ## A=<NULL> number=126 process=1174
LP filter msg - 'cat: write error: Broken pipe' at 2001-10-09-11:19:09.930
## A=<NULL> number=126 process=1174
waiting for printer filter to exit at 2001-10-09-11:19:09.931 ## A=<NULL>
number=126 process=1174
accounting at end at 2001-10-09-11:19:09.931 ## A=<NULL> number=126
process=1174
finished 'cfA126martinu', status 'JFAIL' at 2001-10-09-11:19:09.932 ##
A=<NULL> number=126 process=1174
subserver pid 1174 exit status 'JFAIL' at 2001-10-09-11:19:09.934 ##
A=<NULL> number=0 process=1127
job 'cfA126martinu', attempt 3, allowed 3 at 2001-10-09-11:19:09.966 ##
A=<NULL> number=126 process=1127
send_failure_action 'JREMOVE' at 2001-10-09-11:19:09.966 ## A=<NULL>
number=126 process=1127
job 'cfA126martinu', removing job - status JREMOVE at
2001-10-09-11:19:09.967 ## A=<NULL> number=126 process=1127
removing job 'cfA126martinu' - JREMOVE at 2001-10-09-11:19:09.983 ##
A=<NULL> number=126 process=1127

Vypis z vystup

added interface ip=192.168.36.249 bcast=192.168.36.255 nmask=255.255.255.0
Usage: /usr/bin/smbclient service <password> [options]
Version 2.0.7
        -s smb.conf           pathname to smb.conf file
        -O socket_options     socket options to use
        -R name resolve order use these name resolution services only
        -M host               send a winpopup message to the host
        -i scope              use this NetBIOS scope
        -N                    don't ask for a password
        -n netbios name.      Use this name as my netbios name
        -d debuglevel         set the debuglevel
        -P                    connect to service as a printer
        -p port               connect to the specified port
        -l log basename.      Basename for log/debug files
        -h                    Print this help message.
        -I dest IP            use this IP to connect to
        -E                    write messages to stderr instead of stdout
        -U username           set the network username
        -L host               get a list of shares available on a host
        -t terminal code      terminal i/o code
{sjis|euc|jis7|jis8|junet|hex}
        -m max protocol       set the max protocol level
        -W workgroup          set the workgroup name
        -T<c|x>IXFqgbNan      command line tar
        -D directory          start from directory
        -c command string     execute semicolon separated commands
        -b xmit/send buffer   changes the transmit/send buffer (default:
65520)


Soubor /tmp/smbprint.log  yustal prazdny

Z tohoto bych chapal, ze soubor smbprint vygeneruje spatnou syntaxi pro
smbclient.

Co mi vsak neni jasne je proc kdyz napisu prikaz

smbclient //tlf/HP6P heslo -I x.y.z.m -U jmeno -W worgroup -c print
/tmp/vystup

je vysledek (heslo, IP adresa, jmeno a skupina jsou umyslne yamaskovane, ale
zadavam je
100% spravne)

added interface ip=192.168.36.249 bcast=192.168.36.255 nmask=255.255.255.0
Domain=[PROGRES] OS=[Windows NT 4.0] Server=[NT LAN Manager 4.0]
print <filename>

ale do fronty na na serveru se nic nedostane

Moje dve otazky: 1. proc mam spatnou syntaxi ve smbprintu, co tam zmenit
                 2. proc se nic nedostane do fronty po zadani prikazu
smbclient


 Martin UVIRA
 technik HW

 mailto:martinu na iftprogres.cz
 mob.tel: 0602 340 123

 I.F.T. PROGRES a.s.
 Dluhonska 43, 750 02 Prerov
 tel: 0641/ 302 170
 fax: 0641/ 225 457
 http://www.iftprogres.cz

 INFORMACNI TECHNOLOG



Další informace o konferenci Linux