LinuxQuestions.org
Visit Jeremy's Blog.
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 09-08-2009, 10:04 AM   #1
m1n
Member
 
Registered: Feb 2009
Posts: 33

Rep: Reputation: 15
Using samba


Just started with samba. What I want is a disk Z on windows machine located on a linux server. Now i am trying to access samba client from linux server.

Quote:
[cameraman@dev.linux]> smbclient \\\\dev.linux\\tmp
Server not using user level security and no password supplied.
Receiving SMB: Server stopped responding
tree connect failed: Call returned zero bytes (EOF)

[cameraman@dev.linux]> cat /etc/samba/smb.conf

[global]

workgroup = MSHOME
netbios name = dev.linux
hosts allow = mynote
security = user

[share1]

path = /tmp

[share2]
path = /root/camera_set
what's wrong?
 
Old 09-08-2009, 11:45 AM   #2
j_jerry
Member
 
Registered: Sep 2009
Distribution: fedora 11
Posts: 318

Rep: Reputation: 46
Might be because firewall is blocking the connection. Stop the firewall and try again, if it works then we can make exceptions in firewall for samba
 
Old 09-08-2009, 11:46 AM   #3
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
did you give your users a samba password? you can do this by typing in smbpasswd <username>? That would be the first thing to try if you have not already.
 
Old 09-08-2009, 01:33 PM   #4
m1n
Member
 
Registered: Feb 2009
Posts: 33

Original Poster
Rep: Reputation: 15
Arrow

Quote:
Originally Posted by jstephens84 View Post
did you give your users a samba password? you can do this by typing in smbpasswd <username>? That would be the first thing to try if you have not already.
Done. The same error
 
Old 09-08-2009, 01:37 PM   #5
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
ok try
Code:
smbclient \\\\localhost\\tmp -u <enter username>
make sure that user is the same one that you just ran smbpasswd on.

you can also verify everything by running
Code:
smbclient -L <server ip address>
 
Old 09-08-2009, 02:10 PM   #6
m1n
Member
 
Registered: Feb 2009
Posts: 33

Original Poster
Rep: Reputation: 15
I am having strange results with dev.linux vs localhost:
Quote:
[root@dev ~]# smbclient -L dev.linux
Password:
Receiving SMB: Server stopped responding
tree connect failed: Call returned zero bytes (EOF)
[root@dev ~]# smbclient -L localhost
Password:
Domain=[DEV.LINUX] OS=[Unix] Server=[Samba 3.0.25b-0.el5.4]

Sharename Type Comment
--------- ---- -------
share1 Disk
share2 Disk
IPC$ IPC IPC Service (Samba 3.0.25b-0.el5.4)
Domain=[DEV.LINUX] OS=[Unix] Server=[Samba 3.0.25b-0.el5.4]

Server Comment
--------- -------

Workgroup Master
--------- -------
MSHOME
[root@dev ~]# smbclient -L dev.linux
Password:
Receiving SMB: Server stopped responding
tree connect failed: Call returned zero bytes (EOF)
[root@dev ~]# smbclient \\\\localhost\\tmp -u root
session setup failed: NT_STATUS_LOGON_FAILURE
[root@dev ~]# smbclient \\\\localhost\\tmp
Password:
Domain=[DEV.LINUX] OS=[Unix] Server=[Samba 3.0.25b-0.el5.4]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
[root@dev ~]# smbclient \\\\dev.linux\\tmp
Password:
Server not using user level security and no password supplied.
Receiving SMB: Server stopped responding
tree connect failed: Call returned zero bytes (EOF)
[root@dev ~]#
 
Old 09-08-2009, 02:16 PM   #7
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by m1n View Post
I am having strange results with dev.linux vs localhost:
Ok this is what happens when you deprive yourself of sleep. I forgot that you actually want to connect to the share name. so you need to replace tmp with share1.

IE
smbclient \\\\localhost\\tmp

with

smbclient \\\\localhost\\share1
 
Old 09-08-2009, 03:04 PM   #8
m1n
Member
 
Registered: Feb 2009
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks! I am on the right way... now i can connect using localhost and annonymus account only on share1...

Quote:
Last login: Mon Sep 7 05:09:01 2009 from mynote
[root@dev ~]#
[root@dev ~]#
[root@dev ~]# smbclient \\\\localhost\\share1
Password:
Anonymous login successful
Domain=[MSHOME] OS=[Unix] Server=[Samba 3.0.25b-0.el5.4]
smb: \> exit
[root@dev ~]# smbclient \\\\localhost\\share2
Password:
Anonymous login successful
Domain=[MSHOME] OS=[Unix] Server=[Samba 3.0.25b-0.el5.4]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
[root@dev ~]# smbclient \\\\dev.linux\\share1
Password:
Server not using user level security and no password supplied.
Receiving SMB: Server stopped responding
tree connect failed: Call returned zero bytes (EOF)

Last edited by m1n; 09-08-2009 at 03:05 PM.
 
Old 09-08-2009, 03:09 PM   #9
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by m1n View Post
Thanks! I am on the right way... now i can connect using localhost and annonymus account only on share1...
You should also be able to connect to share2 that same way. Looks like share2 points to /root/camera_set

The names of the share can of course be changed by editing the share names between the bracket.

[share1]
path = /tmp

[share2]
path = /root/camera_set

to say
[mytmp]
path = /tmp

[camera]
path = /root/camera_set

course you would then tell smbclient to connect to mytmp or camera

Code:
smbclient \\\\localhost\\mytmp
Just wanted to add that tid bit of information just in case you haven't made it that far.
 
Old 09-08-2009, 03:22 PM   #10
m1n
Member
 
Registered: Feb 2009
Posts: 33

Original Poster
Rep: Reputation: 15
Ok. But what about loclalhost vs dev.linux? Why I can't use dev.linux?
 
Old 09-08-2009, 03:27 PM   #11
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
try using dev.linux, I just have a habbit of refering to localhost when I am trying to connect to something that is local to the server that I am working on. Just remember that it should be

Code:
smblicent \\\\dev.linux\\share1  or share2
if you are getting any errors post them and we will get your working.
 
Old 09-09-2009, 03:31 AM   #12
m1n
Member
 
Registered: Feb 2009
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks for trying to help me.


using no password i am having this :

Quote:
[root@dev ~]# smbclient \\\\localhost\\share1
Password:
Anonymous login successful
Domain=[MSHOME] OS=[Unix] Server=[Samba 3.0.25b-0.el5.4]
smb: \> exit

[root@dev ~]# smbclient \\\\dev.linux\\share1
Password:
Server not using user level security and no password supplied.
Receiving SMB: Server stopped responding
tree connect failed: Call returned zero bytes (EOF)
I even tryed using root samba password but the same error
 
Old 09-09-2009, 12:49 PM   #13
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
I think it is because when you are connecting with the actual machine name it looks at it a little differently. So you will want to put a -u <username> after that so that it will prompt you for a user that is allowed access.

Try using this.
Code:
smbclient \\\\dev.linux\share1 -u <username>
substitute <username> for the user that your ran smbpasswd for.
 
  


Reply



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/Cups print sharing problems (/var/spool/samba files) Gates1026 Linux - General 9 06-23-2013 01:33 AM
Newbie: Samba under Ubuntu - default config locations don't match samba.org mdutch Ubuntu 0 08-28-2009 02:38 PM
I need the content from thegoldenear.org/toolbox/unices/samba/samba-setup.html rtg2001 Linux - Networking 1 08-05-2004 05:54 PM
Samba: Authenticate Linux-Clients in Samba Domain & Mount mule Linux - Software 0 12-10-2003 01:21 AM
when i restart SAMBA,it says:stop samba failed,start SAMBA OK! whepin Linux - Networking 3 12-26-2001 05:54 AM

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

All times are GMT -5. The time now is 03:48 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