LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-01-2013, 09:21 AM   #1
stephsanol
LQ Newbie
 
Registered: Jul 2013
Posts: 4

Rep: Reputation: Disabled
Unhappy Smbclient connection from shell file


Hi.
Im trying to connect from a linux client to a windows server via smbclient and it works perfectly when I do it from my terminal with the following command:

smbclient \\\\192.168.52.108\\brinks -U user passwd -W domain

But when I try to run that same command from a shell file it gives me the following error:

session setup failed: NT_STATUS_LOGON_FAILURE

What am I doing wrong in my shell script?

Thanks for your help.

Last edited by stephsanol; 08-01-2013 at 09:24 AM.
 
Old 08-02-2013, 01:49 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,374

Rep: Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383
Possibly an environment problem, but try putting
Code:
set -xv
at the top of the shell file and see what it says.
 
Old 08-02-2013, 02:35 AM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,450

Rep: Reputation: 2776Reputation: 2776Reputation: 2776Reputation: 2776Reputation: 2776Reputation: 2776Reputation: 2776Reputation: 2776Reputation: 2776Reputation: 2776Reputation: 2776
also try //192.168.52.108/brinks (do not use backslash)
 
  


Reply

Tags
samba, smbclient


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
samba smbclient gives connection to 192.168.1.50 failed (error NT_STATUS_HOST_UNREAC) ARANGANAYAKI Linux - Networking 1 06-29-2013 03:20 AM
[SOLVED] Copying file from another machine with scp and smbclient SibBear Linux - Networking 2 06-02-2012 08:10 AM
smbclient check file modified before 'get' hattori.hanzo Linux - Newbie 1 10-28-2010 09:09 AM
shell script for smbclient ericyao Linux - Server 2 02-01-2010 11:37 PM
abrupt connection resets with smbclient Stephen Chee Linux - General 0 02-28-2006 06:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration