How to change the Samba Print lpr-cups owner to %m instead of 'user'

How to change the Samba Print lpr-cups owner to %m instead of 'user'

Post by Brian Mar » Wed, 09 Jan 2002 02:58:57



First off, let me apologize if this posting is in the wrong newsgroup.

Does anyone know how to change the following lpr-cups command so that
the machine name or Windows user name shows up in the printer queue as
the 'owner' when printing.  I found the %m and %U session variables
but I don't know the lpr-cups command syntax.

lpr-cups -P %p -o raw %s -r   # using client side printer drivers.

Also, I'm looking for the lppause, lpresume, queuepause, and
queueresume commands for samba using cups.

Thanks in advance for your help!!!!!!

Here's the whole smb.config file:

# Samba config file created using SWAT
# from 192.168.1.155 (192.168.1.155)
# Date: 2002/01/07 12:45:42

# Global parameters
[global]
        workgroup = myworkgroup
        server string = Samba Server %v
        security = SHARE
        encrypt passwords = Yes
        update encrypted = Yes
        log file = /var/log/samba/log.%m
        max log size = 50
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        dns proxy = No
        wins server = 192.168.1.2
        guest account = user
        hosts allow = 192.168.1.

[printers]
        comment = All Printers
        path = /var/spool/samba
        printer admin = user
        create mask = 0700
        guest ok = Yes
        printable = Yes
        printing = cups
        print command = lpr-cups -P %p -o raw %s -r   # using client side
printer drivers.
        lpq command = lpstat -o %p
        lprm command = cancel %p-%j
        browseable = No

[hp8000]
        path = /var/spool/samba
        printer admin = user
        read only = No
        create mask = 0700
        guest ok = Yes
        printable = Yes
        printing = cups
        print command = lpr-cups -P %p -o raw %s -r   # using client side
printer drivers.
        lpq command = lpstat -o %p
        lprm command = cancel %p-%j
        printer name = hp8000
        printer driver = HP LaserJet 8000 Series PS
        oplocks = No
        share modes = No

[HP4500]
        path = /var/spool/samba
        printer admin = user
        read only = No
        create mask = 0700
        guest ok = Yes
        printable = Yes
        printing = cups
        print command = lpr-cups -P %p -o raw %s -r   # using client side
printer drivers.
        lpq command = lpstat -o %p
        lprm command = cancel %p-%j
        printer name = HP4500
        printer driver = HP C LaserJet 4500-PS
        oplocks = No
        share modes = No

[Phaser1]
        path = /var/spool/samba
        printer admin = user
        read only = No
        create mask = 0700
        guest ok = Yes
        printable = Yes
        printing = cups
        print command = lpr-cups -P %p -o raw %s -r   # using client side
printer drivers.
        lpq command = lpstat -o %p
        lprm command = cancel %p-%j
        printer name = Phaser1
        printer driver = Tektronix Phaser 850DP
        oplocks = No
        share modes = No

[Phaser2]
        path = /var/spool/samba
        printer admin = user
        read only = No
        create mask = 0700
        guest ok = Yes
        printable = Yes
        printing = cups
        print command = lpr-cups -P %p -o raw %s -r   # using client side
printer drivers.
        lpq command = lpstat -o %p
        lprm command = cancel %p-%j
        printer name = Phaser2
        printer driver = Tektronix Phaser 850DP
        oplocks = No
        share modes = No

[sambaspool]
        comment = Samba Print Spool Directory
        path = /usr/sambaspool/
        read only = No
        guest ok = Yes

[cupsspool]
        comment = Linux Native Print Spool Directory
        path = /var/spool/cups/
        read only = No
        guest ok = Yes

 
 
 

How to change the Samba Print lpr-cups owner to %m instead of 'user'

Post by Ling Jian » Thu, 10 Jan 2002 03:54:24


Brian,

Based on your smb.conf, your user may use the print service as a guest. A
guest is not an authenticated user and the owner attribute of the job record
will be the guset account name, which is what is shown in the owner column
in the queue.

To change that,  you will have to make sure all users are authenticated. In
order to avoid account administration for all the PC users, you can map all
print users back to the guest account name by adding
username map = <map_path>, where <map_path> is the path of the usermap that
contains <guest_account> = *.

Good luck.

Ling Jiang

 
 
 

1. Print jobs; are owner's name same as login user's name?

I hope this is a simple question, but I want to be able to have
the print job printed in Win95 to be owned by the person who
started the print job. If I print from Win95 to a printer on
the Sun OS 4.1.3 system , the print queue changes my name from
marksk (my login user name) to the name pcprint. If a printer
gets messedup, I can't delete or stop the printjob because I
now don't own it.  If someone knows if the "guest account ="
line in the [printer] area is required, could they let me know?
I couldn't tell from the samba.conf faq/man page.

thanks for all of your(netpersons) help, I have been following
this newsgroup in order to get Win95 to talk to Sun OS 4.1.3
using Samba... everything is great now except this last little
bit.
here is the relevent clipping from samba.conf.

thanks,
Mark Skinner
San Diego, CA USA
-------------------------------------------------
[global]
   printing = bsd
   printcap name = /etc/printcap
   lpq command = /usr/ucb/lpq -P %p
   print command = /usr/ucb/lpr -r -P %p %s
   load printers = yes
   guest account = nobody
   log file = /usr/local/samba/var/log.%m
   log level = 1

[homes]
   comment = Home Directories
   browseable = yes
   read only = no
   create mode = 0750

[printers]
   guest account = pcprint ; this is the line I am wondering
                           ; about, if I remove it what will
                           ; the print job's owner be?
   comment = All Printers
   path = /tmp
   browseable = yes
   printable = yes
   public = yes
   writable = no
   create mode = 0700

2. Using Ingres Open Road to Oracle Database?

3. Change 'Administrator' password in 'Active Directory users'

4. DirectCD, EasyCD Creator

5. Cant SET 'user cant change password' AND 'password never expires'

6. ppp redialer

7. Changing a user password who has 'Change Password at next Logon' flagged

8. owner / group / world browsing of 'home'

9. Can't print to Win2K hosted printer from CUPS

10. Remove 'User cannot change Password' in AD

11. samba won't work with lpr

12. Users can't get on internet, get Default Internet Web Site instead