Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I refresh Profile Manager's printers?

When I first installed Lion Server, I set up some print queues and configured them into Profile Manager's device groups. They pushed out and everything was cool. Except I decided I hate the names I gave the printers. Profile Manager is stuck with the original names.


I've renamed the queues, I deleted and re-created the queues.


When I go into Profile Manager and try to update the profiles. no go. The OLD queue names keep popping up. Ive deleted every payload in Profile Manager that touches the printers. Every time I try to add a new printer profile, the old queue names pop-up.


I've restarted profile manager several times to no avail.


I'm guessing somwhere there's a plist to delete or something to tell Profile Manager to re-read the configured printers.


Any thoughts???


Thanks

Posted on Aug 4, 2011 8:25 PM

Reply
31 replies

Mar 29, 2014 1:20 PM in response to Steven Major

Alright, so I had 4 hours to kill on a saturday afternoon to figure out what should be possible in under 30 seconds with a few mouse clicks. If you're reading sarcasm with a dash of annoyance in there, good. Mission accomplished.


Firstly, delete the printer(s) you no longer want the normal way via System Preferences.


To get into the database via the Termainl:


sudo psql -U _devicemgr -d devicemgr_v2m0 -h /Library/Server/ProfileManager/Config/var/PostgreSQL


Now, the key here is this differs from previous instructions by the username & database name.


I think this is why some report "not all of my printers are showing up." Somewhere along the line Apple changed it, possibly during an upgrade, and didn't clean up afterwards. Using the old instructions you'll see that database as it was post-migration and changes you make won't work.


I confirmed this on a server that had been upgraded since 10.7 to now 10.9.2 & Server 3.1.1. A recent clean build I did for another project had no existance of "device_management" and only the above "devicemgr_v2m0"


Once in list your printers with:


select * from printers;


Delete the one(s) you don't want with:


delete from printers where id=[put the ID# of the printer you want deleted here];


\q to exit when done.


Like I said, a couple hours this afternoon, I'll be testing it further to see if it breaks something else. 😝


Love to know if this helps someone!

-Steve

Mar 31, 2014 8:33 AM in response to Steven Major

You sir are my new hero!


Thank you for doing Apple's job. This worked perfect!


@ Apple: I know you never like to post Terminal commands in the KB, but you really need to add this somewhere. Many who are suffering from your lack of providing a real Server OS need tips like this. Or you could just fix it so that when we remove a printer from System Prefs it updates the SQL DB.


Thanks again Mr. Major!

Apr 28, 2014 11:19 AM in response to Steven Major

Hi Steven. I think you're solution to this issue is likely very helpful. I'm sorry to be thick, but I'm not following the command. I'm able to get in to devicemgr_v2m0-#, but I'm not follwoing what to do next. You said:

Once in list your printers with:


select * from printers;

But I'm not sure how to type this, or if I'm doing something incorrectly. Is the whole phrase supposed to be typed in, or is the asterisk a placeholder? When I type "select [absolutely anything] from printers," I'm just given another prompt. It's like it accepts my command, but doesn't do anything either. Does this command just help us to see the ID# of the printer in question? Can you provide some more guidance on how to navigate the commands for devicemgr?


And, come on Apple! This has apparently been an issue since profile manager was introduced with Lion in 2011, surely you would have figured out that people were having problems with this by now!

Apr 28, 2014 11:31 AM in response to atoss

Hello,


Yes, when you're in there and give that command, it should list the printers that you would also see in Profile Manager.


Use that number to delete the one(s) you don't want *after* you've removed them from the Server's Printers & Scanners System Preference.


At that prompt, you're in the PostgreSQL database that Profile Manager uses. I'm a novice at PostgreSQL but it similar to MySQL (which I'm more familiar with) so I know just enough to be dangerous. I've not looked at doing anything else, but you could (I'm sure) list/delete/edit anything you find in Profile Manager like Computers/iOS Devices, Device Groups, etc.


Again, I've not looked to do much since I've not needed to. I did see a thread in here where someone added a device and it caused Profile Manger to continually error in the web interface. He did similar to my printer trick to remove the last computer he remembered having added and saved his whole setup.


-Steve

Jun 2, 2014 4:29 AM in response to Steven Major

Steve, I just wanted to thank you for the information you posted here. Your efforts on this have saved my school a tremendous amount of work for printer deployment. I can confirm that this process still works as of OS X 10.9.3 and Server 3.1.2. I can't thank you enough! The one thing that threw me off was the semi-colon! For anyone seeking to use these commands, the semi-colon IS a part of the script! LOL!


Dear Apple:

Profile Manager is fantastic! Except you completely BOTCHED printer deployment! Please address this in an update. At the very least, create an article describing the rationale used for the Printing configuration in Profile Manager and list these commands for administrators to use as a work around!


Thanks again, Steve!

Dec 4, 2014 9:25 AM in response to paul@crc

Yes, this does indeed work, however, I saw an entire database go corrupt when directly editing it in this fashion. The simplest solution we have found it to just use Directory Utility.app, go to the Directory Editor Tab, authenticate to the /LDAPv3/127.0.0.1, change view to Printers, and then remove them. Simple, safe, and effective! ;-)


I have to say, lots of Terminal ninja skills displayed in this thread. I'm impressed and amazed at the display of skill.

Dec 4, 2014 10:45 AM in response to fkick1

Hmmm, that's interesting. They were for us on 10.9.5. They won't appear unless you authenticate as diradmin maybe? I know they won't appear unless you authenticate, but not certain if the user matters. I'm about to deploy on 10.10.1, I'll update to see if my method still works in this fashion, since I'm almost certain the bug remains.



EDIT****

Your Correct. My method is now junk. 10.10.1, printers are no longer listed. But of course, the bug remains. Thanks @Apple.

How do I refresh Profile Manager's printers?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.