Here is what I have in my smb.conf. I can see and manage the queue from
a windows box (95,98) and the file names are the names from windows,
not the random file names assigned by samba.

I have a printer on the linux server which handles postscript jobs,
and have the windows box configured to use a generic postscript driver
(HP Laserjet III + or some such). This works fine, and avoids all the
silly driver hassles others complain about. Why this isn't a universal
practice is beyond me.

You might want to put the printing commands into the printer share.
%J captures the file name from windows for the queue. The long print
command strips off the long boilerplate prefix which some apps send. Samba
uses for the queue name the -J parameter in the lpr command. You could
make that any name you wanted. For example, you might use the user's
name instead of the file name sent by windows or created by samba.  
Joel


[global]
        name resolve order = lmhosts wins bcast hosts
        encrypt passwords = yes 
        netbios name = HAMMER2
        netbios aliases = gateway
        interfaces = 192.168.0.2 
        security = SHARE
        log level = 3 
        wins server = jhammer6
        guest account = ftp
        strict sync = Yes


[ps]
        path = /tmp
        read only = No
        create mask = 0700
        guest ok = yes
        hosts allow = 192.168.
        printable = Yes
        printing = lprng
        print command = echo %J %p %s  >>  /tmp/junkJ;\
                       a="`echo '%J' | sed "s/^.*- //"`" ;\
                       echo This is truncated $a >> /tmp/junkJ;\
                       /usr/bin/lpr -Pps  -J"$a"  %s;\
                       rm %s
        lpq command = /usr/bin/lpq -Pps
        lprm command = /usr/bin/lprm -Pps %j
        lppause command = /usr/sbin/lpc hold z53 %j
        lpresume command = /usr/sbin/lpc release z53 %j
        share modes = No
        use client driver = yes     

I use LPRng and have this one line in lpd.perms:
DEFAULT ACCEPT

Joel

On Thu, Nov 07, 2002 at 07:06:38PM -0600, Russ Ward wrote:
> 
> I know this question has been answered here a while back, but I have not been able 
>to find the mailing with the posts on it.  
> 
> -----==========-----
> I have a redhat server that I am using as a file/print server for student use.  I am 
>using samba to help the users with Windows.  The problem I have is that when using 
>printing a user can submit a print job, and it prints fine, but cannot see the status 
>of the printer.
> 
> When you click on the printer icon you get: "Status: Opening"
> 
> When you double click to open the printer status window you get: "$Printer Failed to 
>open, retrying"
> 
> What is needed to enable to the users to be able to see the printer status?
> 
> -----==========-----
> Config:
> 
> Redhat 8.0
> Samba 2.2.6pre2
> LPRng 3.8.9
> 
> -----==========-----
> smb.conf:
> 
> [global]
>         workgroup = COESTUDENTS
>         netbios name = STUDENTS
>         netbios aliases = students
>         server string = COE Student File & Print Server [%v]
>         security = user
>         encrypt passwords = yes
>         restrict anonymous = yes
>         domain admin group = root @root
>         domain logons = yes
>         os level = 100
>         preferred master = yes
>         domain master = yes
>         wins server = XXX.XXX.XXX.XXX
>         wins proxy = yes
>         dns proxy = yes
>         #hosts allow = XXX.XXX.
>         load printers = no
>         printer admin = root @root @adm
>         printing = lprng
>         print command = /usr/bin/lpr  -P%p -r %s
>         lpq command = /usr/bin/lpq  -P%p
>         lprm command = /usr/bin/lprm -P%p %j
>         lppause command = /usr/sbin/lpc hold %p %j
>         lpresume command = /usr/sbin/lpc release %p %j
>         queuepause command = /usr/sbin/lpc  -P%p stop
>         queueresume command = /usr/sbin/lpc -P%p start
>         share modes = No
>         log file = /var/log/samba/%m.log
>         max log size = 512
>         smb passwd file = /etc/samba/smbpasswd
>         socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
>         case sensitive = no
>         preserve case = yes
>         short preserve case = yes
>         default case = lower
>         mangle case = no
> #       use client driver = yes #tried with no success
> 
> [ME_Lab]
>         printer = ME_Lab
>         path = /tmp
>         browseable = yes
>         public = no
>         writeable = no
>         printable = yes
> #       valid users = @ME
> 
> -----==========-----
> printcap:
> 
> ME_Lab:
>         :sd=/var/spool/lpd/ME_Lab
>         :af=/var/spool/lpd/ME_Lab/acct
>         :lf=/var/spool/lpd/ME_Lab/log
>         :cd=/var/spool/lpd/ME_Lab
>         :lp=130.18.196.88%9100
>         :ifhp=model=hp5,trace,pagecount=pjl,debug=0,status
>         :filter=/usr/libexec/filters/ifhp
>         :as=|/usr/bin/perl /appl/lpd_quota.pl start
>         :ae=|/usr/bin/perl /appl/lpd_quota.pl end
> 
> -----==========-----
> 
> Thanks
> Russ
> 
>   #####################################################
>  #  Russ Ward:                                       ##
> ##################################################### #
> #  Mississippi State University: College of Eng.    # #
> #  email: [EMAIL PROTECTED]                     # #
> #  phone: 662.325.0151                              # #
> #  icq: 7703575                                     # #
> #  aim, yahoo, jabber, slashdot: russward662        ##
> #####################################################
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba

Reply via email to