Posted on 08-24-2010 07:44 AM
Hello everyone,
I need to create a print policy, that when a user logs into their machine they have a defaults preset of Black and White double sided printing. They still need to have the ability to change to colour, or modify/create additional presets. If the user changes any of the presets, once they log back in again, the policy will need to always default to black and white, double sided. We use follow-me printing in the agency, all the printers are HP Edgelines. Help would be much appreciated :)
Regards,
Myron Joffe
Senior Mac Engineer
JWT London IT Department
myron.joffe at jwt.com
Telephone: 020 7656 7033
Posted on 08-24-2010 08:20 AM
Well, I don't know much about the enforcement portion of it, but to
change the defaults, you can do so through CUPS... open Safari / FireFox
and do http://localhost:631 <http://localhost:631/> --> Administration
Tab (across the top) --> Manage Printers --> Select the printer you wish
to adjust defaults for --> Under the Administration drop down box select
Set Default Options --> (set any installed options) --> Click on
"General" tab --> and set your Print Style (2 sided printing) and any
other settings.
Then you can upload that to Casper for printer deployments. There may
be a more elegant way to do it, but this way worked for us.
I can get some screen captures if it would make it easier.
John Wojda
Lead System Engineer, CTS
3333 Beverly Rd. B2-338B
Hoffman Estates, IL 60179
Phone: (847)286-7855
SMS / Text Page: 2245873298
<mailto:12245873298 at messaging.sprintpcs.com>
Team Lead: Chris Sta Ana
<mailto:cstaana at searshc.com;jwojda at searshc.com?subject=John%20Wojda%20Fe
edback&body=I%20am%20contacting%20you%20regarding%20John%20Wojda.>
Posted on 08-22-2012 09:17 AM
John,
Previously we had been creating customized presets to enable duplex as default for printer deployments, but found your instructions to be much more reliable. Thanks!
Posted on 09-06-2012 03:57 PM
Is there a way to set a default for all printers?
Posted on 08-06-2013 12:12 PM
Hi John,
I like your idea, but you say "Then you can upload that to Casper for printer deployments". How do you upload CUPS setting for the specific printer to JSS for deployment? I have it set how I want, but am stuck on how to implement.
Thanks!
Posted on 01-20-2014 09:24 AM
Bump....
My executives just pinged me to get this set as well for the default to B&W. Any updates on how to do this?
Posted on 01-20-2014 10:53 AM
@JimAllsop, you can use lpadmin with lptoptions to specify things such as B+W.
As long as the device driver supports it, I've a write up on something similar as an example: http://macmule.com/2013/07/16/canon-imagerunner-advance-c5240i-b2-printing-duplex/#more-613
Posted on 01-20-2014 03:15 PM
Thanks @bentoms
I must admit I new to script writing and in my test machines I am having some issues getting it to work.
#!/bin/bash
lpoptions -p "AdmPri-TechServicesA" -l
-o EFColorMode=Grayscale
exit 0
Here is what I have and it does not seem to be working am I missing something? Thanks in advance!
Posted on 01-20-2014 03:49 PM
I tried this as well and it didn't work.
#!/bin/bash
/usr/sbin/lpadmin -p
lpoptions -p "AdmPri-TechServicesA" -l
-o EFColorMode=Grayscale
exit 0
I am missing something simple.
Posted on 01-20-2014 10:32 PM
@JimAllsop, Looks like your almost there. :)
But it looks like you've not been pointing the command to the PPD, amend the below with the PPD's location.
#!/bin/sh
/usr/sbin/lpadmin -p <insert_printer_name> -E -v "AdmPri-TechServicesA" -P <insert location of PPD>-o EFColorMode=Grayscale"
Posted on 01-21-2014 06:31 AM
Thanks for the help!
I have modified the scrip to look like this. /usr/sbin/lpadmin -p AdmPri-TechServicesA -E -v AdmPri-TechServicesA -P /Library/Printers/PPDs/Contents/Resources -o EFColorMode=Grayscale
Now when I run it in terminal to test I get "lpadmin: Is a directory" I can't seem to find what I am missing here. Thanks so much @bentoms for your help. The good news is when I get it right for my office printer I get to do it for 63 other printers! OH JOY!!!! (please use sarcasm when reading the last part.)
Posted on 01-21-2014 06:54 AM
The only thing I see that is wrong in your statement is that you are not defining a PPD for the printer. You are pointing to the directory, but not to the actual printer PPD file.
This is the command I use for a Dell color printer we have here. Notice the -P option goes all the way to the actual PPD file:
lpadmin -p ATT-Test-Printer -L "19th Floor Copy Room" -E -o printer-is-shared=false -v lpd://x.x.x.x -P /Library/Printers/PPDs/Contents/Resources/Dell 5130cdn Color Laser PS.gz
You can try just entering: /usr/sbin/lpadmin to make sure you get a return. Should get info about what switches to use in Terminal.
Posted on 01-21-2014 07:25 AM
/usr/sbin/lpadmin -p AdmPri-TechServicesA -E -v AdmPri-TechServicesA -P /Library/Printers/PPDs/Contents/Resources/LANIER MP C3002.gz -o EFColorMode=Grayscale
I get an error for MP??
Posted on 01-21-2014 07:51 AM
@JimAllsop][/url, if you'll notice the example that @stevewood][/url sited for you, he has the back slash ( ) character before the spaces in the name of the folder. Those are important. Your command should look like:
/usr/sbin/lpadmin -p AdmPri-TechServicesA -E -v AdmPri-TechServicesA -P /Library/Printers/PPDs/Contents/Resources/LANIER MP C3002.gz -o EFColorMode=Grayscale
Posted on 01-22-2014 09:11 AM
Thanks so much @mpermann and @stevewood ! I really appreciate it!
Posted on 02-19-2014 02:06 PM
So say you got the default Setting set up so that a particular color printer is set to print Black and white. I've done that, and I also set up an optional "Color" preset for the one-offs of required color printing.
But I can't seem to capture the preference, or find the command to set the "Show Preset's dialog to select the "Reset Presets Menu to "Default Settings" After Printing" for Mac OS 10.9.1. If I can get this selected then even though the user changes to the Color preset, it will always go back to the default preset at the next print job, instead of keeping the previous preset (Color) used.
Any suggestions on how to set this option?
Posted on 04-04-2019 11:05 AM
Hi,
Maybe you guys can help me on this. I'm trying to follow this but no luck. Pls. help we have a printer Ricoh which the model is MP C3504ex PS and we are using follow you print in our school. We want in our printer grayscale as out default settings. I tried to follow the guide but no luck.
Posted on 09-20-2019 01:00 PM
yeah im not see this working in Mojave as well.
when i do a lpoptions -p MW_Color_Duplex -l i see it as Duplexing is set, but it does not set it in the GUI printe box.
Also tried to set the CUPS local host way, it says it is set for
Defaults: job-sheets=none, none media=na_letter_8.5x11in sides=two-sided-long-edge
but nothign is actaully changing inthe GUI.
Thansk for any help.
Posted on 09-20-2019 04:57 PM
For those of you trying to set up optional printer hardware (ie Finishers, lower paper trays, etc.)...
Here's my approach to configuring printers in general... I set this up as a Self-Service Policy.
First, I install the printer driver onto a machine (a "Gold Master" of sorts) and I manually configure that printer for all the appropriate Lower Paper Trays, Finishers, etc.
Then I use these tools to find out the proper flags I need to use...
From there, I build the following script and upload to my Jamf Server...
#!/bin/sh
#
# Printer Installation Script
#
#
# Office Location: Address, City, State ZIP Country
#
#
# Change Control
# 2017-08-09
# Modified by Caine Hörr <caine.horr@okta.com>
# Added $6 to array to allow for additional -o option flags
# Enabled CUPS web interface
# Organized printers by floor
#
# 2016-09-27
# Original Script written by Brandon Modesitt (Interlaced) <support@interlacedit.com>
#
# 1. CUPS Name (-p $1)
# 2. Physical Address Location (-L $2)
# 3. FQDN Address (-E -v $3)
# 4. Description as seen by the user (-D $4)
# 5. Path to PPD file (-P $5)
# 6. Additional printer configuration options ($6)
# Obtain all additional -o options via ppdOptionsDiff.command script
# http://www.brunerd.com/blog/2012/03/13/getting-and-setting-ppd-options-via-command-line-for-use-with-lpadmin-in-os-x/
# Enable CUPS web interface
cupsctl WebInterface=yes
# Add printer function
addPrinter() {
lpadmin -p "$1" -L "$2" -E -v "$3" -D "$4" -P "$5" "$6"
# Printer installation error checking
if [ $? -ne 0 ]; then
echo "ERROR: Failed to add $1. Verify that the correct printer driver has been installed."
else
echo "Successfully added $1."
fi
}
# Printers to be configured
IFS=$'
'
#
# PRINTER MAKE/MODEL: Ricoh MP C6004
# IP ADDRESS: xxx.xxx.xxx.xxx
# DNS: ricoh01.domain.com
#
printer01="ricoh01.domain.com
Address, City, State ZIP Country
lpd://ricoh01.domain.com
1st Floor
/Library/Printers/PPDs/Contents/Resources/RICOH MP C6004
-o printer-is-shared=false -o OptionTray=2Cassette"
#
# PRINTER MAKE/MODEL: Ricoh MP C4504ex
# IP ADDRESS: xxx.xxx.xxx.xxx
# DNS: ricoh02.domain.com
#
printer02="ricoh02.domain.com
Address, City, State ZIP Country
lpd://ricoh02.domain.com
2nd Floor
/Library/Printers/PPDs/Contents/Resources/RICOH MP C4504ex
-o printer-is-shared=false -o OptionTray=2Cassette"
# Call to add printer function
addPrinter $printer01
addPrinter $printer02
exit
First, I deploy printer drivers to my entire fleet via a Jamf Computer Policy. I upload the driver pkg file into Jamf and I use a workflow consiting of Computer Smart Groups and recuring checkins, etc. Do the typical stuff, check for proper macOS version, Jamf Binary is current, do they already have the driver or not, etc.
After that, I create a Self Service Policy that runs the aforementioned script. Now my users can install printers to their hearts content.
No fuss no muss.
Cheers!
Caine Hörr
A reboot a day keeps the admin away!
Posted on 09-23-2019 05:48 AM
So that what i did, first deploy the drivers form Apple.
Then i create a printer using Jamf Admin
But when i try to set defaults like double sided pritning i cant get it to work in Mojave, no matter what commnds I sue, even using CUPS doesnt seem to work. The web page shows it set but when i go to print i still have to check teh box for 2 sided printing.
What am i missing? Do i need to point to he PPD?
lpadmin -p MW_Color_Duplex -o Duplex=DuplexNoTumble -E
when i do a list it shows it as set.
lpoptions -p MW_Color_Duplex -l | grep Duplex Duplex/Two-Sided: None DuplexNoTumble DuplexTumble HPOption_Duplexer/Duplex Unit: True False HPManualDuplexSwitch/Manual Duplex: True False HPManualDuplexPrintGuide/Print Reinsertion Guide: True False HPManualDuplexOrientation/Binding: *DuplexNoTumble DuplexTumble