I have being trying to figure out how to print to a printer attached to a
networked win95 machine using samba for about 2 hours now and I don't seem
to be getting anywhere. I was hoping someone could shed some light on the
matter if I supply some details. 

First of all, I also have win95 on my machine and it prints to the other
machine fine. So there is no problem on the hardware side.

The printer I am trying to print to is called HPLIII as listed
from the output of  "smbclient -L Main" where Main is the server:
--------------------------------------------------------------------------------
Added interface ip=130.15.134.30 bcast=130.15.134.255 nmask=255.255.255.0
Got a positive name query response from 130.15.134.16 (130.15.134.16)
read socket failed. ERRNO=111
Server time is Thu May  8 18:52:58 1997
Timezone is UTC-4.0

Server=[MAIN] User=[] Workgroup=[IIGR] Domain=[IIGR]

        Sharename      Type      Comment
        ---------      ----      -------
        D              Disk
        HPLIII         Printer
        IPC$           IPC       Remote Inter Process Communication
        PRINTER$       Disk         
--------------------------------------------------------------------------------
My first concern is with the read socket failed. But I don't know what to
do about this (some debuging info below). I have setup a printcap entry as
specified in the print2win mini-howto with a device created by 
"touch /dev/iigr" as specified in the bottom of that document. The
printcap entry is:

iigr|Remote samba printer:\
        :cm=HP III Printer in IIGR Room 301:\
        :lp=/dev/iigr:\
        :sd=/var/spool/lpd/iigr:\
        :af=/var/spool/lpd/iigr/acct:\
        :mx#0:\
        :if=/usr/local/bin/smbprint:

Question 1: Is acct supposed to be a file that I create or a directory?

I have also copied smbprint from the /usr/doc/samba/example directory and
placed it in /usr/local/bin as specified above (my exact smbprint is
listed at the end of this file). 

my /etc/smb.conf is

[global]
   printcap name = /etc/printcap
   load printers = yes
   guest account = nobody
   invalid users = root
[printers]
   comment = All Printers
   browseable = no
   path = /tmp
   printable = yes
   public = no
   writable = no
   create mode = 0700
[hpliii]
   path = /tmp
   readonly = yes
   printable = yes
   public = true

and my /var/spool/lpd/iigr/.config is

server=Main
service=hpliii
password=""
user=terrapin

So, when I go to print a file using lpr -Piigr foo.txt nothing happens at
the other end. /var/spool/lpd/iigr/status says "lp is ready and printing"
and /tmp/smb-print.log states

server Main, service hpliii
server Main, service hpliii 

I really don't know what else to add except for the output from testparm,
the output from "smbclient ////main//hpiii -d 4 -P" and my smbprint file:

PS. I also tried to use the print command from the prompt in smbclient
without sucess. Any help is very much appreciated. Cheers, Colin.


----------output from testparm
Load smb config files from /etc/smb.conf
Processing section "[printers]"
Processing section "[hpliii]"
Loaded services file OK.
Press enter to see a dump of your service definitions
Global parameters:
        debuglevel: 2
        syslog: 1
        syslog only: No
        protocol: 5
        security: 0
        printing: 0
        max disk size: 0
        lpq cache time: 10
        encrypt passwords: No
        getwd cache: Yes
        read prediction: No
        read bmpx: Yes
        read raw: Yes
        write raw: Yes
        use rhosts: No
        load printers: Yes
        null passwords: No
        strip dot: No
        interfaces: 
        password server: 
        socket options: 
        netbios name: 
        smbrun: /usr/bin/smbrun
        veto files: 
        log file: 
        config file: 
        smb passwd file: 
        hosts equiv: 
        preload: 
        server string: Samba 1.9.16p11
        printcap name: /etc/printcap
        lock dir: /var/lock/samba
        root directory: /
        default service: 
        message command: 
        dfree command: 
        passwd program: /bin/passwd
        passwd chat: *old*password* %o\n *new*password* %n\n *new*password* 
%n\n *changed*
        valid chars: 
        workgroup: TERRAPIN
        domain controller: 
        username map: 
        character set: 
        logon script: 
        logon path: 
        remote announce: 
        socket address: 0.0.0.0
        max log size: 5000
        mangled stack: 50
        max mux: 2
        max xmit: 65535
        max packet: 65535
        password level: 0
        keepalive: 0
        deadtime: 0
        time offset: 0
        read size: 16384
        os level: 0
        max ttl: 14400
        wins support: Yes
        wins proxy: No
        wins server: 
        preferred master: Yes
        domain master: No
        domain logons: No
        browse list: Yes

Default service parameters:
        comment: 
        copy: 
        include: 
        exec: 
        postexec: 
        root preexec: 
        root postexec: 
        alternate permissions: No
        revalidate: No
        default case: 0
        case sensitive: No
        preserve case: No
        short preserve case: No
        mangle case: No
        mangling char: ~
        browseable: Yes
        available: Yes
        path: 
        username: 
        guest account: nobody
        invalid users: root
        valid users: 
        admin users: 
        read list: 
        write list: 
        volume: 
        force user: 
        force group: 
        read only: Yes
        max connections: 0
        min print space: 0
        create mask: 0755
        set directory: No
        status: Yes
        hide dot files: Yes
        guest only: No
        guest ok: No
        print ok: No
        postscript: No
        map system: No
        map hidden: No
        map archive: Yes
        locking: Yes
        strict locking: No
        share modes: Yes
        only user: No
        wide links: Yes
        sync always: No
        mangled names: Yes
        fake oplocks: No
        print command: lpr -r -P%p %s
        lpq command: lpq -P%p
        lprm command: lprm -P%p %j
        lppause command: 
        lpresume command: 
        printer: 
        printer driver: NULL
        hosts allow: 
        hosts deny: 
        dont descend: 
        magic script: 
        magic output: 
        mangled map: 
        delete readonly: No

Service parameters [printers]:
        comment: All Printers
        browseable: No
        path: /tmp
        create mask: 0700
        print ok: Yes

Service parameters [hpliii]:
        path: /tmp
        guest ok: Yes
        print ok: Yes

Service parameters [iigr]:
        comment: Remote samba printer
        path: /tmp
        create mask: 0700
        print ok: Yes
        printer: iigr

Service parameters [IPC$]:
        comment: IPC Service (Samba 1.9.16p11)
        path: /tmp
        status: No
        guest ok: Yes

----------------Output from smbclient ////main//hpiii -d 4 -P
terrapin:~$ smbclient \\\\MAIN\\HPLIII -d 4 -N -P
05/08/97 19:10:23 client started (version 1.9.16p11)
Initialising global parameters
Processing configuration file "/etc/smb.conf"
Processing section "[global]"
doing parameter printcap name = /etc/printcap
doing parameter load printers = yes
doing parameter guest account = nobody
doing parameter invalid users = root
doing parameter workgroup = terrapin
pm_process() returned Yes
adding IPC service
Netmask for eth0 = 255.255.255.0
Derived broadcast address 130.15.134.255
Added interface ip=130.15.134.30 bcast=130.15.134.255 nmask=255.255.255.0
Opening sockets
bind succeeded on port 0
nmb packet from 130.15.134.16 header: id=17574 opcode=0 response=Yes
    header: flags: bcast=No rec_avail=No rec_des=Yes trunc=No auth=Yes
    header: rcode=0 qdcount=0 ancount=1 nscount=0 arcount=0
    answers: nmb_name=MAIN(20) rr_type=32 rr_class=1 ttl=300000
    answers   0 char ......   hex 0000820F8610
Got a positive name query response from 130.15.134.16 (130.15.134.16)
read socket failed. ERRNO=111
Connecting to 130.15.134.16 at port 139
Connected
max mux 2
max vcs 1
max raw 65536
capabilities 0x203
Sec mode 514
max xmt 2920
Got 8 byte crypt key
Chose protocol [NT LM 0.12]
Server time is Thu May  8 19:09:56 1997
Timezone is UTC-4.0
Server gave us a UID of 0. We gave 208
Connected with cnum=53250 max_xmit=2920
smb: \> quit
terrapin:~$  


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .

Reply via email to