Previous 1 2 3 Next 31 Replies Latest reply: Oct 6, 2015 12:35 AM by Macorland0
joe_mck Level 1 (25 points)

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???



  • joe_mck Level 1 (25 points)

    Based on other problems, I decided to do a clean install of Lion Server. So my problem is OBE, but reinstalling the OS is a poor solution. Profile Manager disappoints.

  • bornpilot Level 1 (0 points)

    Hi, joe_mck. I would gather that if you were to change the name of a printer or delete a printer in System Preference the change would not take in Profile Manager. The issue is to be a problem with a helper file backbend of Profile Manager or device manager. First create the test. Change the name of a printer and/or delete a printer in System Preferences. Restart Profile Manger in and then log into Profile Manager web interface and try to add a printer to a user/device profile and see if the change took place in the list of printers. If the name change or printer that was delete in System Preferences did not delete in Profile Manger web interface go to this file location:




    Once you have opened this ruby file in your favorite text editor make these changes to the file. Once you have made the change restart Profile Manager from and try the test again as listed above and see if it works.







    # update current printers to the cached printers in the db
         p_hash ={|x| x['identifier'] == identifier}.first
        if (p_hash)
           p = Printer.find_by_identifier(identifier);
           if p
           p.deleted = false
           p_hash.each { |key, value| p[key] = value if p.respond_to?(key) }
        # Remove non-existant printersfrom database
           p = Printer.find_by_identifier(identifier);
           if p
             p.deleted = true
  • gmulholl Level 1 (0 points)

    You can also go and manually remove printer entries from the Postgres database that holds all profile information.


    You can find information at this link: rver/


    It helped me quite a bit. Once you get in as a user


    select * from printers;


    Find the printer you want to remove:


    delete from printers where id=[the id of the printer you want to remove];


    You need to close and reopen profile manager -- or maybe even restart the server -- for the change to show in the management screen. You could also try marking the printer as deleted with:


    update printers set deleted=TRUE where id=[id...];


    That did not work for me on the first try, but I did not reboot the server afterward, so maybe it was just that I did not see the impact.


    I agree though, this is a pain. Apple's printer functionality in Profile Manager seems to be terribly underdeveloped. I might go as far as to say it is not ready for prime time.

  • sofalounge Level 1 (0 points)

    Unfortunatly the path doesn't exist anymore (probably because the Server-Version 2.2). Does anybody know which is th current path ore an other workaround?

    Hope for an easy solution.

  • Yaron360 Level 1 (0 points)

    I found the "printer_helper.rb" here:


    /Applications/ pers


    bornpilot's fix does work, thanks!

  • fkick1 Level 1 (60 points)

    Has anyone gotten this to work in 10.8 server? I've tried bornpilot's fix using Yaron360's location, and I can see and edit the file, but after restarting the profile manager service, all the printers basically just become locked in the "remove" position in profiles. Printers that are removed from system prefs or name changed dont actually change.


    I'd be happy to go in and edit the database file by hand, but everytime I try to use a psql command i get the following error:


    psql: could not connect to server: No such file or directory

              Is the server running locally and accepting

              connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?


    Anyone have any suggestions?


  • Yaron360 Level 1 (0 points)

    To avoid the error you need to change the permissions on the socket file. so in Terminal do:

    sudo chmod o+rw /var/pgsql_socket/.s.PGSQL.5432


    but in 10.8 the server locaton has chnage so you need to go to:

    /Library/Server/PostgreSQL For Server Services/Socket


    So your command will look like this:

    sudo chmod o+rw /Library/Server/PostgreSQL\ For Server\ Services/Socket.s.PGSQL.5432


    Now you can get in with user _postgres and password will be your admin password


    Once you are done you should change the permissions back by running the same command and replacing o+rw with o-rw

  • fkick1 Level 1 (60 points)

    Thanks for the reply Yaron, but I'm still getting that error... it looks like it's still trying to connect to the database at /var/pgsql_socket/.s.PGSQL.5432


    Do you know the command to cause psql to change to the new 10.8 database?



  • Marc Kerr Level 1 (0 points)

    I don't know the first thing about pgsql but I'm figuering it out. What I do know is to get in use this command.


    sudo /Applications/ -U _postgres -d device_management -h /Library/Server/PostgreSQL\ For\ Server\ Services/Socket/


    Note you have to use the correct scoket to see whats in it. I didn't have to change any permissions on anything to get in this way. At least I don't rember doing it.

  • Marc Kerr Level 1 (0 points)

    OK I think I've figured it out. Please correct if you see errors.


    First you have to get into the database. I didn't need to set any special permissions or add users to the DB to do this. You do want to have have the initial command run as root. I actually ran sudo -s to become root first. Then ran these commands.


    Before any of this I cleared the printers from System Preferences and actually did a full reset on the printing system, right click in Print & Scan.


    This will connect you to the correct database using the correct version of psql.


    /Applications/ -U _postgres -d device_management -h /Library/Server/PostgreSQL\ For\ Server\ Services/Socket/


    Note that if you are running Server 10.8.2 then psql is 9.2.1, the psql in /usr/bin/psql is older and not the one you want.


    At the prompt list your db with \d, note that device_management=# is your prompt while you are in the db. Type help, \h or \? to get more info.


    device_management=# \d


    Now you will see the tables. The ones you are after are public | printers and public | printing_knob_sets. You can see the contents of the tables this way.


    device_management=# select * from "public"."printers" ;


    device_management=# select * from "public"."printing_knob_sets" ;


    To clear these tables run the following.


    device_management=#  DELETE FROM printers ;


    device_management=#  DELETE FROM printing_knob_sets ;


    After all that I was able to recreate the printers and add them to Profile Manager. With more knowledge about pgsql you should be able to remove individual printers from the table or add them in.

  • Ofir Gal Level 1 (135 points)

    On 10.9 this causes an error and failure when attempting to display the available printers in Profile Manager.


    If I leave as is then what seems to happen is that when I delete printers in Sys Prefs, Profile Manager doesn’t update its printer list. Same if I rename existing printers.


    If I add new printers, they sometimes show up in PM and sometimes don’t.

  • Ofir Gal Level 1 (135 points)

    On 10.9 Server I get the following error:


    psql: could not connect to server: No such file or directory

              Is the server running locally and accepting

              connections on Unix domain socket "/Library/Server/PostgreSQL For Server Services/Socket//.s.PGSQL.5433"?

  • Marc Kerr Level 1 (0 points)

    I poseed thing info in another thread also but too much info isn't a bad thing.


    For Mavericks (10.9) and Server 3 Apple changed the postreas setup again, just slightly.


    Apple removed /user/bin/psql and associated apps so now you only have one psql to deal with and it’s in your environment path. Running ‘which psql’ will show you /Applications/


    That has simplified things a little.


    The socket has moved also and is now in:



    So to get into the database run this command.

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


    Use \d to see the tables \h to get help \q to exit. See the man page or the postgresql documentation online for more if you are new to this, like me.

  • Ofir Gal Level 1 (135 points)

    Thanks, I'm one step closer. When I try this is what I get:


    device_management=# select * from "public"."printers" ;

    id | last_modified_guid | admin_session | temporary_id | deleted | created_at | updated_at | identifier | DeviceURI | DisplayName | Location | Model | PPDURL | PrinterLocked

    ----+--------------------+---------------+--------------+---------+------------+ ------------+------------+-----------+-------------+----------+-------+--------+ ---------------

    (0 rows)



    But when I use Profile Manager I see 8 printers listed.

Previous 1 2 3 Next