• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Print management issue: cannot remove printer.

Scheduled Pinned Locked Moved Unsolved
FOG Problems
4
22
4.6k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    dambron
    last edited by Jun 14, 2017, 12:18 AM

    Server
    • FOG Version: Running Version 1.4.2
    • OS: Debian 8.x
    Client
    • Service Version: 0.11.12
    • OS: Windows 7 x64
    Description

    Howdy, I’m fairly new to FOG but I’ve gotten things up and running this week so we can do away with our Ghost licensing shortly. Pretty much everything is working exactly how it is supposed to on my end: inventory, pulling images, deploying images, multicasting, domain member management, hostname changing, and even adding printers.

    The one issue I am having is that removing printers does not function. Even worse is that after the printer has been removed from the host, the printer still appears for new users on the machine, ones who hadn’t ever previously logged in on that computer and thus had no printers associated with their account locally. The printer is also re-adding after manual removal, I’m guessing due to registry entries for the printer.

    The client log file hasn’t given me any idea how to fix this, but here it is:

    ------------------------------------------------------------------------------
    --------------------------------PrinterManager--------------------------------
    ------------------------------------------------------------------------------
     6/13/2017 6:43 PM Client-Info Client Version: 0.11.12
     6/13/2017 6:43 PM Client-Info Client OS:      Windows
     6/13/2017 6:43 PM Client-Info Server Version: 1.4.2
     6/13/2017 6:43 PM Middleware::Response No Printers
    ------------------------------------------------------------------------------
    

    Has anyone found an elegant solution to fix this that doesn’t involve manually flushing out registry entries? Or maybe I’m doing something stupid and I just haven’t been using FOG long enough to realize it…

    Any feedback would be greatly appreciated. TIA.

    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Jun 14, 2017, 12:26 AM

      I’d recommend seeing if rebooting might help? I didn’t see if that had happened or not.

      I only suggest trying this because of the “even other users logged in see it” type issue you are describing.

      The Printer add element is a nicety, but it’s typically a “user based” thing for the default. The FOG Client doesn’t run as a logged in user, rather it runs as the “SYSTEM” (Windows root if you will) user. Adding printers is pretty simple, but removing them is not so elegant (and I’m fairly sure this isn’t a problem in coding though I’m also no good with C# language). The reboot should ensure the printer “traces” would be lost.

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      D 2 Replies Last reply Jun 14, 2017, 1:23 AM Reply Quote 0
      • D
        dambron @Tom Elliott
        last edited by Jun 14, 2017, 1:23 AM

        @Tom-Elliott Sorry I should have added that I already tried rebooting them several times after updating the host print settings. I also went through and double checked all of the server settings that I could think of and didn’t see anything out of the ordinary.

        I really wish I was getting a specific error message from FOG but there’s nothing at all, and every other component works seamlessly! Maybe I will just have to live without print management. I actually don’t mind so much but I feel like it would benefit our helpdesk team a lot.

        I’m home from the office now and need a break from this stuff, but I’m going to go through the windows logs more thoroughly tomorrow to see if this could be a windows issue, or maybe even a permissions issue? I dunno, I’m just brainstorming here cause I’m at a loss.

        1 Reply Last reply Reply Quote 0
        • D
          dambron @Tom Elliott
          last edited by Jun 14, 2017, 5:30 PM

          It occurs to me that this issue must relate to one of two things:

          1.) Either the way FOG adds a printer is causing an issue, since the printer reappears after manual removal when the same or any other domain user logs in again. I can manually add and remove network printers all day long and it works just fine.
          or
          2.) FOG is not actually trying to remove the printer once it has been removed from the host using the printer management tab in the console, and is in fact still trying to add the printer to the hosts continually. I haven’t seen any failures or log errors, so I am leaning more towards this being the case.

          I am using the “FOG Managed Printers” option for the group/hosts, I assume this is correct? Do you know of anything else I could check on the FOG side of things?

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by Jun 22, 2017, 8:12 AM

            @dambron Sorry this has been unanswered for some days. I’ve had this on my list but couldn’t find the time to spin up a test setup as I don’t usually have windows clients around.
            @Moderators Is anyone of you able to replicate this issue?

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            D 1 Reply Last reply Jun 22, 2017, 4:02 PM Reply Quote 0
            • W
              Wayne Workman
              last edited by Jun 22, 2017, 1:41 PM

              @dambron said in Print management issue: cannot remove printer.:

              after manual removal, I’m guessing due to registry entries for the printer.

              Sounds like group policy is adding the printer. If the FOG Client were doing it, it’d be plainly written in the fog log.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
              Daily Clean Installation Results:
              https://fogtesting.fogproject.us/
              FOG Reporting:
              https://fog-external-reporting-results.fogproject.us/

              D 1 Reply Last reply Jun 22, 2017, 3:58 PM Reply Quote 1
              • D
                dambron @Wayne Workman
                last edited by Jun 22, 2017, 3:58 PM

                @Wayne-Workman said in Print management issue: cannot remove printer.:

                @dambron said in Print management issue: cannot remove printer.:

                after manual removal, I’m guessing due to registry entries for the printer.

                Sounds like group policy is adding the printer. If the FOG Client were doing it, it’d be plainly written in the fog log.

                The test group for this print issue happens to be an IT training room with 12 identical machines. I only added the printer to 4 of them via FOG and the others don’t have any printers managed or showing up. All the machines belong to the same OU, so it’s not a policy being applied at the computer level. It’s also not at the user level because I’ve tried a multitude of users and we don’t use GPO to manage any print settings at all generally. For the heck of it I browsed through and don’t see any local group policies that were applied, so I don’t think it has anything to do with GPO at all.

                1 Reply Last reply Reply Quote 0
                • D
                  dambron @Sebastian Roth
                  last edited by dambron Jun 22, 2017, 10:13 AM Jun 22, 2017, 4:02 PM

                  @Sebastian-Roth said in Print management issue: cannot remove printer.:

                  @dambron Sorry this has been unanswered for some days. I’ve had this on my list but couldn’t find the time to spin up a test setup as I don’t usually have windows clients around.
                  @Moderators Is anyone of you able to replicate this issue?

                  Even with the FOG client removed and after removing both the printer and computer from the FOG console, the printer still adds any time an account logs in to Windows. So back to my original theory, it’s the registry entry for the printer. Somehow the way that FOG is adding the printer enforces it through the registry for every user after it is added, even if you “remove” it via FOG.

                  In order to prove this I flushed out every entry for the printer in the registry using a manual search of the registry, and now the printer no longer automatically adds for every user.

                  Just for the hell of it, here’s what the log shows when I add and then “Remove” a printer.

                  ------------------------------------------------------------------------------
                  --------------------------------PrinterManager--------------------------------
                  ------------------------------------------------------------------------------
                   6/22/2017 10:58 AM Client-Info Client Version: 0.11.12
                   6/22/2017 10:58 AM Client-Info Client OS:      Windows
                   6/22/2017 10:58 AM Client-Info Server Version: 1.4.2
                   6/22/2017 10:58 AM Middleware::Response Success
                   6/22/2017 10:58 AM PrinterManager Adding printers
                   6/22/2017 10:58 AM Printer Adding: \\*server*\NCC2100
                   6/22/2017 10:58 AM PrinterManager PrintUI return code = 0
                   6/22/2017 10:58 AM PrinterManager Invoking add \\*server*\NCC2100 for all users
                   6/22/2017 10:59 AM PrinterManager PrintUI return code = 0
                   6/22/2017 10:59 AM PrinterManager Restarting spooler
                  ------------------------------------------------------------------------------
                  
                  ------------------------------------------------------------------------------
                  --------------------------------PrinterManager--------------------------------
                  ------------------------------------------------------------------------------
                   6/22/2017 11:01 AM Client-Info Client Version: 0.11.12
                   6/22/2017 11:01 AM Client-Info Client OS:      Windows
                   6/22/2017 11:01 AM Client-Info Server Version: 1.4.2
                   6/22/2017 11:01 AM Middleware::Response Success
                   6/22/2017 11:01 AM PrinterManager Adding printers
                   6/22/2017 11:01 AM PrinterManager \\*server*\NCC2100 has already been configured
                  ------------------------------------------------------------------------------```
                  
                  ------------------------------------------------------------------------------
                  --------------------------------PrinterManager--------------------------------
                  ------------------------------------------------------------------------------
                   6/22/2017 11:06 AM Client-Info Client Version: 0.11.12
                   6/22/2017 11:06 AM Client-Info Client OS:      Windows
                   6/22/2017 11:06 AM Client-Info Server Version: 1.4.2
                   6/22/2017 11:06 AM Middleware::Response No Printers
                  ------------------------------------------------------------------------------
                  
                  1 Reply Last reply Reply Quote 0
                  • S
                    Sebastian Roth Moderator
                    last edited by Sebastian Roth Jun 22, 2017, 11:19 AM Jun 22, 2017, 5:18 PM

                    @dambron
                    This is what the fog-client used to manage printers on Windows clients. Maybe try calling those by hand and see if it properly cleans it all up. Start a cmd window as Administrator and run:

                    rundll32.exe printui.dll,PrintUIEntry /dn /n "\\*server*\NCC2100"
                    rundll32.exe printui.dll,PrintUIEntry /gd /n "\\*server*\NCC2100"
                    

                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                    D 1 Reply Last reply Jun 22, 2017, 5:50 PM Reply Quote 0
                    • D
                      dambron @Sebastian Roth
                      last edited by Jun 22, 2017, 5:50 PM

                      @Sebastian-Roth said in Print management issue: cannot remove printer.:

                      @dambron
                      This is what the fog-client used to manage printers on Windows clients. Maybe try calling those by hand and see if it properly cleans it all up. Start a cmd window as Administrator and run:

                      rundll32.exe printui.dll,PrintUIEntry /dn /n "\\*server*\NCC2100"
                      rundll32.exe printui.dll,PrintUIEntry /gd /n "\\*server*\NCC2100"
                      

                      Huh, well that seems to work just fine, which I guess makes sense. I know that if you add a printer using

                      RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /z /n\\computername\printername
                      

                      Then you can’t remove that printer using the traditional add/remove method in Windows, you must run the /dn /gd commands to remove it.

                      So it looks like it’s being added properly but the remove command isn’t working for some reason. Very interesting… at least I feel like I understand what’s happening now, if not why! Thanks so much for the assistance.

                      W 1 Reply Last reply Jun 23, 2017, 1:15 PM Reply Quote 0
                      • W
                        Wayne Workman @dambron
                        last edited by Wayne Workman Jun 23, 2017, 7:17 AM Jun 23, 2017, 1:15 PM

                        @dambron I feel I should add - printer management in fog has different modes. ‘Add only’ will only add printers, not remove.

                        There are two other modes. I don’t remember what they are but - one only manages printers that are in fog, the other only allows fog assigned printers.

                        So for the managed printer to be managed by fog and removed by fog, the printer must still exists in fog, but be removed from the host via fog.

                        The other option is much more tougher in my opinion but suites some well. The last is fog manages all printers on a box - if they are not assigned then fog removes it, doesn’t matter if it’s a fog printer or not. Local usb isn’t possible in this setup without creating a printer of the same name in fog and assigning it. I don’t recommend this option.

                        Looking at the logs, I’d say you are in ‘Add only’ mode.

                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                        Daily Clean Installation Results:
                        https://fogtesting.fogproject.us/
                        FOG Reporting:
                        https://fog-external-reporting-results.fogproject.us/

                        1 Reply Last reply Reply Quote 0
                        • S
                          Sebastian Roth Moderator
                          last edited by Jul 18, 2017, 2:55 PM

                          @Wayne-Workman good point about the “Add only” mode!

                          @dambron is this still an issue?

                          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                          D 1 Reply Last reply Jul 18, 2017, 3:18 PM Reply Quote 0
                          • D
                            dambron @Sebastian Roth
                            last edited by dambron Jul 18, 2017, 9:19 AM Jul 18, 2017, 3:18 PM

                            @Sebastian-Roth

                            http://imgur.com/a/UqKGY

                            I am using the “FOG Managed Printers” option for the group/hosts, as I posted previously. There is no “add only” mode that I see. I see an option for FOG to manage only FOG printers (both add and remove), an option for FOG to manage ALL printers (allows it to add and remove Fog and non-FOG managed printers), and an option for it to manage NO printers. I see that the documentation shows the option for “Add-only” and “Add and Remove” but are you sure this is not out of date? I don’t see those options or descriptions in the Print Management menus for any of my hosts and the configuration settings for Print Management don’t contain anything of the sort either.

                            Also, I’ve tried all the options under that menu, just in case they were incorrectly labeled, and had no different results. The only way for me to remove a printer is by manually running the rundll32.exe print commands on the machine. It seems that the remove commands are not correctly being sent to the host computer via FOG.

                            PS: I feel like I’m taking crazy pills with all of you talking about add-only mode and patting each other on the back for pointing out something that would be hilariously obvious to me if it were set incorrectly… please let me know if this option is located somewhere I’m unaware of because I do not see it located where the documentation says it should be.

                            1 Reply Last reply Reply Quote 0
                            • S
                              Sebastian Roth Moderator
                              last edited by Jul 19, 2017, 2:09 AM

                              @dambron I am very sorry if it seemed like we were just trying to put you off with this! While being away I got a message from the guy who did all the new client development and he mentioned the “add only” mode just as Wayne did and so I thought I should ask you about it without actually looking into it myself. As I haven’t used the printer management myself I didn’t know that this mode was renamed years ago (Jul 10, 2015). Don’t wanna go back to that so I looked through the current client code again. To me it looks as if the “add only” mode is non existent in the client code anymore.

                              I’ve looked through the code for hours now but I still haven’t found out why it wouldn’t delete the printers anymore. Maybe it’s time to get a windows client installed and try this out myself…

                              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                              D 1 Reply Last reply Jul 19, 2017, 5:34 PM Reply Quote 0
                              • D
                                dambron @Sebastian Roth
                                last edited by Jul 19, 2017, 5:34 PM

                                @Sebastian-Roth

                                It’s no problem. I feel bad even making you go through the trouble to look at this, as it’s obviously a lesser used feature. I did find it odd that such a simple thing wasn’t working when every other module/component worked flawlessly. The real reason I would find it useful is that our Helpdesk team manages some business office devices that print checks, tax forms, and sensitive user data. Access to these devices is obviously strictly controlled, but it would be nice if while removing someone’s access centrally we could also cut out their access to peripherals on their network devices.

                                PS: I love FOG, it’s made my life so much better even in the short period of time I’ve been using it. We’re a small shop and so anything that A.) cuts down on field time and B.) works 99% flawlessly on first install is really awesome for me. I’ll bump that up to 100% if we can figure out what is with the printer removal 😛

                                1 Reply Last reply Reply Quote 1
                                • S
                                  Sebastian Roth Moderator
                                  last edited by Jul 19, 2017, 7:17 PM

                                  @dambron Thanks for your message. Don’t worry, I am sure we will figure this out. Just need some more time to become friends with the client code… will keep you posted.

                                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    Sebastian Roth Moderator
                                    last edited by Jul 25, 2017, 5:48 PM

                                    @dambron Making progress here: https://github.com/FOGProject/fog-client/issues/90

                                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      Sebastian Roth Moderator
                                      last edited by Jul 25, 2017, 10:07 PM

                                      @dambron I just updated the github issue linked below. Would you mind testing the new Modules.dll I uploaded. Find the instructions in the issue comment.

                                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        Sebastian Roth Moderator
                                        last edited by Sebastian Roth Jul 26, 2017, 2:49 PM Jul 26, 2017, 8:48 PM

                                        I’m posting this just so I don’t forget about it. “Network Printer” and “TCP/IP Port Printer” seem to behave different. fog-client (FOGService) is able to see “TCP/IP Port Printers"?! Need to test this.

                                        ------------------------------------------------------------------------------
                                        --------------------------------PrinterManager--------------------------------
                                        ------------------------------------------------------------------------------
                                         7/26/2017 12:51 PM Client-Info Client Version: 0.11.12
                                         7/26/2017 12:51 PM Client-Info Client OS:      Windows
                                         7/26/2017 12:51 PM Client-Info Server Version: 14
                                         7/26/2017 12:51 PM Middleware::Response Success
                                        ------------------------------------------------------------------------------
                                        
                                        ------------------------------------------------------------------------------
                                        --------------------------------PrinterManager--------------------------------
                                        ------------------------------------------------------------------------------
                                         7/26/2017 12:52 PM Client-Info Client Version: 0.11.12
                                         7/26/2017 12:52 PM Client-Info Client OS:      Windows
                                         7/26/2017 12:52 PM Client-Info Server Version: 14
                                         7/26/2017 12:52 PM Middleware::Response No Printers
                                         7/26/2017 12:52 PM PrinterManager PrintUI return code = 0
                                         7/26/2017 12:52 PM PrinterManager PrintUI return code = 0
                                         7/26/2017 12:52 PM PrinterManager PrintUI return code = 0
                                         7/26/2017 12:52 PM PrinterManager PrintUI return code = 0
                                         7/26/2017 12:52 PM PrinterManager PrintUI return code = 0
                                        ------------------------------------------------------------------------------
                                        
                                        ------------------------------------------------------------------------------
                                        --------------------------------PrinterManager--------------------------------
                                        ------------------------------------------------------------------------------
                                         7/26/2017 12:53 PM Client-Info Client Version: 0.11.12
                                         7/26/2017 12:53 PM Client-Info Client OS:      Windows
                                         7/26/2017 12:53 PM Client-Info Server Version: 14
                                         7/26/2017 12:53 PM Middleware::Response No Printers
                                        ------------------------------------------------------------------------------
                                        
                                        ------------------------------------------------------------------------------
                                        --------------------------------PrinterManager--------------------------------
                                        ------------------------------------------------------------------------------
                                         7/26/2017 12:56 PM Client-Info Client Version: 0.11.12
                                         7/26/2017 12:56 PM Client-Info Client OS:      Windows
                                         7/26/2017 12:56 PM Client-Info Server Version: 14
                                         7/26/2017 12:56 PM Middleware::Response No Printers
                                        ------------------------------------------------------------------------------
                                        
                                        ------------------------------------------------------------------------------
                                        --------------------------------PrinterManager--------------------------------
                                        ------------------------------------------------------------------------------
                                         7/26/2017 12:58 PM Client-Info Client Version: 0.11.12
                                         7/26/2017 12:58 PM Client-Info Client OS:      Windows
                                         7/26/2017 12:58 PM Client-Info Server Version: 14
                                         7/26/2017 12:58 PM Middleware::Response Success
                                         7/26/2017 12:58 PM PrinterManager Adding printers
                                         7/26/2017 12:58 PM Printer Adding: Elem Lab
                                         7/26/2017 12:58 PM PrinterManager PrintUI return code = 0
                                         7/26/2017 12:58 PM PrinterManager Restarting spooler
                                        ------------------------------------------------------------------------------
                                        

                                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          Sebastian Roth Moderator
                                          last edited by Aug 12, 2017, 8:38 AM

                                          @dambron Did you get to try out the modified DLL I provided?

                                          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 1 / 2
                                          • First post
                                            Last post

                                          238

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project