[Samba] Problem in reading a file using smbclient.

nishant mungse nishantmungse at gmail.com
Fri Nov 18 00:01:39 MST 2011


Thnks 4 helping, I just thought that i am using wrong command, but still
there is problem using get command.

When I use get command to get file.
it gives this O/P

*Short read when getting file \nishant.txt. Only got 0 bytes.*

*And there are contents in this file, size is not zero.
And now I got another problem, when I  do get <filename>, I am getting the
file with zero size and when I write to that file using cat from my normal
terminal and use put <filename>,
I thought it would be reflected back to the file present on the share
folder, but the *"panic"* occurred.

Why is it so?

Nishant Mungse

On Fri, Nov 18, 2011 at 12:22 PM, Volker Lendecke <Volker.Lendecke at sernet.de
> wrote:

> On Fri, Nov 18, 2011 at 11:15:21AM +0530, nishant mungse wrote:
> > Hi all,
> >
> >
> > I am facing a problem in reading the file contents using smbclient.
> >
> > Command:: bin/smbclient //localhost/ubuntu -Ubase%base_system
> >
> > The smb prompt appears, when read the file without smbclient it contains
> > some data, but when try to read through smbclient ie. "print <filename>"
> > it erases all data present inside the file.
> >
> > Why is this happening and how to read and write to file using smbclient.
> Use "get <filename> -"
> Volker

More information about the samba mailing list