LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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.
I´m 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: Rocky 9.2
Posts: 18,363

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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 Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,949

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


Reply

Tags
samba, smbclient



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:05 AM.

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
Open Source Consulting | Domain Registration