[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#284450: cupsys-client: cupsaddsmb -a : asks for a password but doesn't recognize any



found 284450 1.2.7-4etch2
tags 284450 + upstream
forwarded 284450 http://www.cups.org/str.php?L2556
fixed 284450 1.3.4-1
tags 284450 + patch
thanks

Hello!

On Wed, 15 Dec 2004 12:16:24 +0100, Kenshi Muto wrote:
> At Mon, 06 Dec 2004 14:33:03 +0100, tech@mediaforest.net wrote:
>> The command  'cupsaddsmb -a' returns :
>>     Password for root required to access localhost via SAMBA:
>> but when I type in the password, it isn't recognize.
>> I've also tried with other user using -U param  but the result is the same.
>> As I don't know which kind of user it's waiting, I've tried system users 
>> and samba users but It's always the same result.
>
> cupsaddsmb is not friendly tool, but you can get more information by
> 'cupsaddsmb -v', and from your samba server log.

On etch (cupsys_1.2.7-4etch2 and samba_3.0.24-6etch9):
=====
root@tinello:/home/luca# cupsaddsmb -a
Password for root required to access /var/run/cups/cups.sock via SAMBA: 

root@tinello:/home/luca# cupsaddsmb -a -v
Password for root required to access /var/run/cups/cups.sock via SAMBA: 
Running command: smbclient ///var/run/cups/cups.sock/print$ -N \
 -A /var/spool/cups/tmp/4777713434089 -c [...]
WARNING: The "printer admin" option is deprecated
Connection to  failed

Unable to copy Windows 2000 printer driver files (1)!

root@tinello:/home/luca#
=====

When called without specifying any server, the default SAMBA server
wasn't set.  This was reported upstream in STR #2556 and fixed in SVN
r7033 (included in Debian version 1.3.4-1).  Backporting the upstream
patch fixes the bug in cupsys_1.2.7-4etch2:

--8<---------------cut here---------------start------------->8---
--- cupsys-1.2.7/systemv/cupsaddsmb.c.ORG
+++ cupsys-1.2.7/systemv/cupsaddsmb.c
@@ -161,8 +161,13 @@
       }
 
       if (SAMBAServer == NULL)
+      {
 	SAMBAServer = cupsServer();
 
+	if (SAMBAServer[0] == '/')	/* Use localhost instead of domain socket */
+	  SAMBAServer = "localhost";
+      }
+
       if ((status = export_dest(http, argv[i])) != 0)
 	return (status);
     }
@@ -191,8 +196,13 @@
     */
 
     if (SAMBAServer == NULL)
+    {
       SAMBAServer = cupsServer();
 
+      if (SAMBAServer[0] == '/')	/* Use localhost instead of domain socket */
+	SAMBAServer = "localhost";
+    }
+
     num_dests = cupsGetDests2(http, &dests);
 
     for (j = 0, status = 0; j < num_dests; j ++)
--8<---------------cut here---------------end--------------->8---

Thx, bye,
Gismo / Luca

Attachment: pgpFOC0sQnCW_.pgp
Description: PGP signature


Reply to: