Hi out there, I'm facing a problem which drives me nearly nuts... On Solaris 2.6 today I upgraded SAMBA from 2.0.7 to the fresh 2.2.8 from Sunfreeware. Everything works fine - besides the smbclient. I used to use smbclient by some PERL-scripts to transfer huge crowds of files from SUN to some Windblows-boxes. With 2.0.7 everything worked fine for 18 months... As long as I connect to shares using a local windows user account everything works like it did before - without any hassles. For example (7.7.7.7 is a win2k-server): smbclient //7.7.7.7/myshare mypass -U myuse -c "cd mydir; dir" succeeds as it did before... Now some Windows-Boxes changed and I MUST connect to some share where the user account is provided by a Windoze domain (ADS). In this case - according to what I learned from our Win-Admin - the logon name must have the form: domain\user I wrote a small shell script - and it succeeds. The sample-code (6.6.6.6 is a win2k-server): #!/bin/ksh WSHARE="//6.6.6.6/myshare" WUSER=MYDOMAIN\\domuser WPASS=mepass $WRDIR=me2dir /usr/local/samba/bin/smbclient $WSHARE $WPASS -U $WUSER -d 2 -c "cd $WRDIR; dir" And now the really strange part: when I issue the SAME command (parameters) from a PERL script, from the plain command line or even from within the same script with a slightly different syntax /$PATH2BIN/smbclient $WSHARE $WPASS -U MYDOMAIN\domuser -d 2 -c "cd $WRDIR; dir" I ALWAYS get: Unknown parameter encountered: "shared mem size" Ignoring unknown parameter "shared mem size" added interface ip=6.6.6.6 bcast=6.6.6.255 nmask=255.255.255.0 session request to 6.6.6.6 failed (Called name not present) session request to 6 failed (Called name not present) --> session setup failed: NT_STATUS_LOGON_FAILURE <-- The first 5 lines appear also when the script executes succesfully. I tried the -A switch of smbclient, providing it with an appropriate file - I get again "NT_STATUS_LOGON_FAILURE". I'm sure it is not an escape character thing, since three different approaches (oerl, comand line shell, different syntax in script) failed. And I played around with different escape sequences - without any success. Unfortunately there is no way to fallback to a plain local user account (some win-admin-issues)... I searched the Mailing-Lists archives - but I found only cases not applying to the above (some logon things - but the logon itself Ois K - in one case smbclient acts as expected and can logon succesfully). So now I'm kind of stuck... Do you have any pointers ? Thanx for your help in advance Greetings from berlin Oliver
Tom Dickson
2003-Apr-03 00:24 UTC
[Samba] Re: smbclient 2.2.8 gives NT_STATUS_LOGON_FAILURE
You used: domain\user Under most normal (i.e., default) winbind setups, you need to replace the \ with a +. this is in smb.conf as winbind separator = + (or something like that). Bash will take \u as the character "u" Hope this helps. -Tom Dickson