Bug 141456 - Samba Printing Special Characters in password cause breakage on reboot
Summary: Samba Printing Special Characters in password cause breakage on reboot
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kcontrol
Classification: Miscellaneous
Component: kcmprintmgr (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KDEPrint Devel Mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-09 21:12 UTC by morgajel
Modified: 2018-09-04 18:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description morgajel 2007-02-09 21:12:23 UTC
Version:           3.5.5 (using KDE KDE 3.5.5)
Installed from:    Ubuntu Packages
OS:                Linux

This is similar sounding to bug #28807 in kde 2.2.0.

Situation:
Windows admins require printing to be performed via samba.

Creating a printer using SMB works fine... until you reboot. My password contains several special characters (I believe ! or @ are the troublemakers). once rebooted, the kde print module doesn't display the ! nor any of the URI after the @, resulting in an unusable printer and requiring me to recreate the printer every time I reboot (this is a laptop I take home ever night, so it's a pain).

Another issue entirely is displaying my password in the device URI in the info tab for the printer- That's pretty bad for other reasons, but may or may not be related to my issue.  I think the password is not being properly escaped somewhere along the line.
Comment 1 Kurt Pfeifle 2007-02-09 23:59:02 UTC
Let me understand this right: you are trying to print from KDE to a Windows- (or Samba-)shared printer?

And this printer is only accessible by using a username/password?

-------------------------

If yes, you are (or rather: CUPS is) using the "smbspool" backend (symlinked as "smb") to get the data off from your Linux host, and to the Windows print server. smbspool ships as part of Samba. Storing of the Windows login credentials can only happen by storing it inside the "device URI" which looks like "smb://username:password@workgroup/server/printer" (and which is stored in CUPS' /etc/cups/printers.conf file, just like "socket://... or usb://... device URIs). And this is what you see in the info tab you mention... 

There's not much KDE can do about it... It's entirely a Samba+CUPS affair.

Hmmm... we could try to add a thin layer of additional "security by obscurity" by hiding the "username:password@" part in the info tab in case of a smb:// backend...)


As for the fact that the KDEPrint module does not display your password in the device URI any more: can you please check if it is still correct in the printers.conf file of CUPS (in /etc/cups/)? 

If it is changed there, it is very unlikely that KDE changes it. There must be a different problem then...

*If* your password contains any special characters used as separators in the device URI (that is: '/', '@', ':') you are *bound* to have problems with this. Have you tried to escape the special characters contained in the password, like this:

  @ --> %40
  ' --> %27

etc. ??

See also:
   http://www.cups.org/str.php?L997   # here you can find a hint how to work around your problem
   http://www.cups.org/str.php?L1025
   http://www.cups.org/str.php?L1236
   http://www.cups.org/str.php?L1536
   http://www.cups.org/str.php?L221   # another hint!
   http://www.cups.org/str.php?L1404
   

Comment 2 Andrew Crouthamel 2018-09-04 18:01:13 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I am closing this bug. Kcontrol has been replaced by System Settings in Plasma. Please give the latest version of that a try, and open a new bug in "systemsettings" if you continue to have an issue. Thank you!