OpenPrinting / system-config-printer

Graphical user interface for CUPS administration
GNU General Public License v2.0
160 stars 88 forks source link

Idle - Session setup failed: NT_STATUS_ACCESS_DENIED #135

Closed stratosgear closed 5 years ago

stratosgear commented 5 years ago

When adding a printer from system-config-printer I always end up with an error of:

Idle - Session setup failed: NT_STATUS_ACCESS_DENIED

when I try to print a test page.

While trying to connect from the command line with my credentials and workgroud I can connect and send files to the printer.

smbclient --user="username" --workgroup=SOMEWORKGROUP //hostname.of.printer/thePrinter
Unable to initialize messaging context
Enter SOMEWORKGROUP\username's password: 
Try "help" to get a list of possible commands.
smb: \> print /tmp/snow_rules.ps 
putting file /tmp/snow_rules.ps as snow_rules.ps-12585 (32296.2 kb/s) (average 32296.2 kb/s)
smb: \> quit

So obviously my credentials and the printer work fine.

In the system-config-printer gui I have tried to include the workgroup as part of the printer name as SOMEWORKGROUP/hostname.of.printer/thePrinter or include credentials in the provided box, but still no luck. Also, if I skip entering the credentials while editing the printer, I do NOT get a prompt to provide them later on.

How can I debug why system-config-printer gives me the NT_STATUS_ACCESS_DENIED error?

stratosgear commented 5 years ago

Forgot to mention, than when I start system-config-printer from the command line, i get these errors/warnings in the console:

/usr/lib/python3.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.2) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
/usr/share/system-config-printer/system-config-printer.py:315: DeprecationWarning: Gtk.ActionGroup.list_actions is deprecated
  for action in printer_manager_action_group.list_actions ():
/usr/share/system-config-printer/system-config-printer.py:316: DeprecationWarning: Gtk.Action.set_sensitive is deprecated
  action.set_sensitive (False)
/usr/share/system-config-printer/system-config-printer.py:324: DeprecationWarning: Gtk.ActionGroup.get_action is deprecated
  act = printer_manager_action_group.get_action (action)
/usr/share/system-config-printer/system-config-printer.py:354: DeprecationWarning: Gtk.UIManager.ensure_update is deprecated
  self.ui_manager.ensure_update ()
/usr/share/system-config-printer/system-config-printer.py:355: DeprecationWarning: Gtk.UIManager.get_accel_group is deprecated
  self.PrintersWindow.add_accel_group (self.ui_manager.get_accel_group ())
/usr/share/system-config-printer/system-config-printer.py:364: DeprecationWarning: Gtk.UIManager.get_action is deprecated
  action = self.ui_manager.get_action ("/new-printer")
/usr/share/system-config-printer/system-config-printer.py:365: DeprecationWarning: Gtk.Action.create_menu_item is deprecated
  newprinteritem = action.create_menu_item ()
/usr/share/system-config-printer/system-config-printer.py:663: DeprecationWarning: Gtk.Action.get_proxies is deprecated
  for widget in action.get_proxies ():
/usr/share/system-config-printer/system-config-printer.py:2236: DeprecationWarning: Gdk.threads_enter is deprecated
  Gdk.threads_enter ()
/usr/share/system-config-printer/system-config-printer.py:702: DeprecationWarning: Gtk.Menu.popup_for_device is deprecated
  None, event.button, event.time)

plus the fact that I am on arch:

uname -a
Linux serenity 5.0.13-arch1-1-ARCH #1 SMP PREEMPT Sun May 5 18:05:41 UTC 2019 x86_64 GNU/Linux

and running latest version of system-config-printer:

 yay system-config-printer
2 extra/system-config-printer 1.5.11-4 (937.9 KiB 7.1 MiB) (Installed)
    A CUPS printer configuration tool and status applet
1 extra/cups-pk-helper 0.2.6-3 (59.5 KiB 679.0 KiB) 
    A helper that makes system-config-printer use PolicyKit
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==> 
stratosgear commented 5 years ago

After still much further googling (believe me this issue affects me many days now) I found a relative-ish thread that seems to be related:

https://bbs.archlinux.org/viewtopic.php?id=245658

Nothing conclusive yet, but I will follow it and post here if something comes up!

zdohnal commented 5 years ago

Hi @stratosgear thank you for reporting the issue! Actually the error is from cups/samba, not from system-config-printer, so IMO it will be fixed when some of these two got fixed. Ad warnings - there is a pull request for it, but I haven't got to review it yet https://github.com/zdohnal/system-config-printer/pull/129 .