Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 78846

Summary: rpcclient not reading username/password from authfile
Product: [Retired] Red Hat Linux Reporter: Need Real Name <thomasg.smith>
Component: sambaAssignee: Trond Eivind Glomsrxd <teg>
Status: CLOSED WORKSFORME QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-04-08 20:41:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2002-12-02 00:39:08 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020830

Description of problem:
rpcclient (samba-2.2.7-2) ignores username/password specified in authfile (-A)
and uses the string '?_' for the username/password when connected to samba server.

Version-Release number of selected component (if applicable):
samba-2.2.7-2

How reproducible:
Always

Steps to Reproduce:
1. Create authfile:
 username=root
 password=xxxxxxx

2. Issue rpcclient command:
rpcclient zurg -d 1 -A /tmp/fileyHWylr -c "getdriverdir \"Windows NT x86\""

3. Review samba log file.

Actual Results:

/tmp/fileyHWylr
---------------
username=root
password=xxxxxxx

$ rpcclient zurg -d 1 -A /tmp/fileyHWylr -c "getdriverdir \"Windows NT x86\""
failed session setup
Cannot connect to server.  Error was NT_STATUS_LOGON_FAILURE

/var/log/samba/zurg.log
-----------------------
[2002/11/30 10:40:29, 1] smbd/password.c:pass_check_smb(545)
  Couldn't find user '?_' in passdb.
[2002/11/30 10:40:29, 2] smbd/reply.c:reply_sesssetup_and_X(975)
  NT Password did not match for user '?_'!
[2002/11/30 10:40:29, 2] smbd/reply.c:reply_sesssetup_and_X(985)
  Defaulting to Lanman password for ?_
[2002/11/30 10:40:29, 1] smbd/password.c:pass_check_smb(545)
  Couldn't find user '?_' in passdb.
[2002/11/30 10:40:29, 1] smbd/reply.c:reply_sesssetup_and_X(1001)
  Rejecting user '?_': authentication failed
[2002/11/30 10:40:29, 2] smbd/server.c:exit_server(461)
  Closing connections


Expected Results:

$ rpcclient zurg -d 1 -A /tmp/fileyHWylr -c "getdriverdir \"Windows NT x86\""
cmd = getdriverdir "Windows NT x86"
getdriverdir "Windows NT x86"
        Directory Name:[\\zurg\print$\W32X86]


Additional info:

Use the username/password from authfile with -U (samba-2.2.7-2).

$ rpcclient zurg -d 1 -U root%xxxxxx -c "getdriverdir \"Windows NT x86\""
cmd = getdriverdir "Windows NT x86"
        Directory Name:[\\zurg\print$\W32X86]

Use authfile (-A) with samba-2.2.3a-4

$ rpcclient zurg -d 1 -A /tmp/fileyHWylr -c "getdriverdir \"Windows NT x86\""
cmd = getdriverdir "Windows NT x86"
getdriverdir "Windows NT x86"
        Directory Name:[\\zurg\print$\W32X86]

Comment 1 Jay Fenlason 2003-04-08 20:41:18 UTC
WORKSFORME with samba-2.2.7-5.8.0 and 2.2.7-2 on my 8.0 box.  The command I used is
rpcclient frostbite -d 1 -A /tmp/a -c 'getdriverdir "Windows NT x86"'
and /tmp/a contains

username = samba1
password = samba1