LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-09-2010, 08:06 PM   #1
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Rep: Reputation: 2
samba not working


Hi:


I am trying to share files between my Windows XP machine and ubuntu server.

I set up and configured samba following the instructions in the Online Ubuntu Server Guide. https://help.ubuntu.com/10.04/server...ileserver.html


This is the abbreviated version of my smb.conf file here.

[global]
workgroup = HOME
server string = %h server
interfaces = 127.0.0.0/8, 192.168.1.101/24
# map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 17000
dns proxy = No
# wins support = Yes
# usershare allow guests = Yes
passdb backend=tdbsam
panic action = /usr/share/samba/panic-action %d
os level=33

[share]
comment = Ubuntu File Server Share
path = /srv/samba/share
valid users = mansour, Administrator, nasrin
read only = No
create mask = 0755

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = yes

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers



And this is the result of netstat -tan command:

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 192.168.1.101:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN
tcp6 0 0 :::53 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 ::1:631 :::* LISTEN
tcp6 0 0 ::1:953 :::* LISTEN


And these are the permissions of the share directory.

total 4
drwxrwxrwx 2 nobody nogroup 4096 2010-11-23 13:46 share



I appreciate some help troubleshooting my samba server.


mansour
 
Old 12-09-2010, 08:08 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
You have not stated a problem other than "not working." Please clearly state what is not working, including steps taken to reproduce the problem, any error messages you get, and what troubleshooting you have done.
 
Old 12-09-2010, 08:35 PM   #3
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by AlucardZero View Post
You have not stated a problem other than "not working." Please clearly state what is not working, including steps taken to reproduce the problem, any error messages you get, and what troubleshooting you have done.

OK. I mean:

When I type this \\192.168.1.101\share in my windows XP browser:
I get error message:
windows can not find '\\192.168.1.101\share'. Check the spelling and try again.

or

When in Windows XP I type in Run: \\192.168.1.101\share
I get error message:
No network provider accepted the given path.

Or

In my computer : Map Network Drive

Drive Z:

Folder: \\192.168.1.101\share

It won't accept my password. And I am entering ubuntu server username and password.



mansour
 
Old 12-09-2010, 09:08 PM   #4
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Rep: Reputation: 15
Quote:
Originally Posted by mansour View Post
OK. I mean:

When I type this \\192.168.1.101\share in my windows XP browser:
I get error message:
windows can not find '\\192.168.1.101\share'. Check the spelling and try again.

or

When in Windows XP I type in Run: \\192.168.1.101\share
I get error message:
No network provider accepted the given path.

Or

In my computer : Map Network Drive

Drive Z:

Folder: \\192.168.1.101\share

It won't accept my password. And I am entering ubuntu server username and password.



mansour
Hi

can you ping the IP 192.168.1.101 in your other windows xp pc
and post here the status.



thanks

Last edited by cheesewizz; 12-09-2010 at 09:09 PM.
 
Old 12-09-2010, 09:15 PM   #5
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by cheesewizz View Post
Hi

can you ping the IP 192.168.1.101 in your other windows xp pc
and post here the status.



thanks

Actually 192.168.1.101 is the ip address of my ubuntu-server machine and I only have one windows XP machine, there are 2 other linux machines, which are powered off currently.


PING 192.168.1.101 (192.168.1.101) 56(84) bytes of data.
64 bytes from 192.168.1.101: icmp_seq=1 ttl=64 time=0.099 ms
64 bytes from 192.168.1.101: icmp_seq=2 ttl=64 time=0.082 ms
64 bytes from 192.168.1.101: icmp_seq=3 ttl=64 time=0.075 ms
64 bytes from 192.168.1.101: icmp_seq=4 ttl=64 time=0.081 ms
64 bytes from 192.168.1.101: icmp_seq=5 ttl=64 time=0.077 ms
64 bytes from 192.168.1.101: icmp_seq=6 ttl=64 time=0.078 ms
64 bytes from 192.168.1.101: icmp_seq=7 ttl=64 time=0.081 ms
64 bytes from 192.168.1.101: icmp_seq=8 ttl=64 time=0.071 ms
64 bytes from 192.168.1.101: icmp_seq=9 ttl=64 time=0.080 ms
64 bytes from 192.168.1.101: icmp_seq=10 ttl=64 time=0.077 ms
64 bytes from 192.168.1.101: icmp_seq=11 ttl=64 time=0.079 ms
64 bytes from 192.168.1.101: icmp_seq=12 ttl=64 time=0.080 ms

--- 192.168.1.101 ping statistics ---
12 packets transmitted, 12 received, 0% packet loss, time 11000ms
rtt min/avg/max/mdev = 0.071/0.080/0.099/0.006 ms


mansour

Last edited by mansour; 12-09-2010 at 09:18 PM.
 
Old 12-09-2010, 09:54 PM   #6
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Rep: Reputation: 15
Quote:
Originally Posted by mansour View Post
Actually 192.168.1.101 is the ip address of my ubuntu-server machine and I only have one windows XP machine, there are 2 other linux machines, which are powered off currently.


PING 192.168.1.101 (192.168.1.101) 56(84) bytes of data.
64 bytes from 192.168.1.101: icmp_seq=1 ttl=64 time=0.099 ms
64 bytes from 192.168.1.101: icmp_seq=2 ttl=64 time=0.082 ms
64 bytes from 192.168.1.101: icmp_seq=3 ttl=64 time=0.075 ms
64 bytes from 192.168.1.101: icmp_seq=4 ttl=64 time=0.081 ms
64 bytes from 192.168.1.101: icmp_seq=5 ttl=64 time=0.077 ms
64 bytes from 192.168.1.101: icmp_seq=6 ttl=64 time=0.078 ms
64 bytes from 192.168.1.101: icmp_seq=7 ttl=64 time=0.081 ms
64 bytes from 192.168.1.101: icmp_seq=8 ttl=64 time=0.071 ms
64 bytes from 192.168.1.101: icmp_seq=9 ttl=64 time=0.080 ms
64 bytes from 192.168.1.101: icmp_seq=10 ttl=64 time=0.077 ms
64 bytes from 192.168.1.101: icmp_seq=11 ttl=64 time=0.079 ms
64 bytes from 192.168.1.101: icmp_seq=12 ttl=64 time=0.080 ms

--- 192.168.1.101 ping statistics ---
12 packets transmitted, 12 received, 0% packet loss, time 11000ms
rtt min/avg/max/mdev = 0.071/0.080/0.099/0.006 ms


mansour
You can able to ping your samba server IP in your Windows PC how about the other two PC?
can you try to ping your samba server in your two pc.

thanks
 
Old 12-09-2010, 10:01 PM   #7
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by cheesewizz View Post
You can able to ping your samba server IP in your Windows PC how about the other two PC?
can you try to ping your samba server in your two pc.

thanks


Yes, I can. I have done it many times.
The 4 machines can successfully ping each other.
Except of course I can't ping Windows XP from any machine, because of windows security feature that won't allow ICMP packets in. But I can use trace route to Win XP machine from others.


mansour
 
Old 12-10-2010, 12:42 AM   #8
jcelle
LQ Newbie
 
Registered: Nov 2010
Location: Nowhere
Distribution: Debian
Posts: 16

Rep: Reputation: 2
In your smb.conf, remove the 127.0.0.1/8 from the interface list.
You can even comment this line out as bu default, samba listens on all active interfaces
that can broadcast except 127.0.0.1.
BTW, addresses in the 'interface' parameter should be separated by spaces, not commas.
 
Old 12-10-2010, 12:46 AM   #9
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by mansour View Post
It won't accept my password. And I am entering ubuntu server username and password.



mansourmansour
Have you declared the smbpasswd for those users? Ubuntu username and password won't work here.
Try this:

Code:
#smbpasswd -a username
And give the smbpasswd for the users, try logging in with this new password now.
 
Old 12-10-2010, 10:21 AM   #10
scott2004
Member
 
Registered: Nov 2004
Location: Toronto, Canada
Distribution: Debian, OpenBSD, SuSE, Ubuntu
Posts: 68

Rep: Reputation: 15
Mansour,
You should find a log file under /var/log/samba for each machine that tries to connect to Samba. See if you can find the log Windows XP machine and post that to this forum. The log may hold a clue.

Also a question: when you try to connect from Windows are you still getting a "machine not found" type error or are you getting a dialogue for a user name and password?

Scott
 
Old 12-10-2010, 11:15 AM   #11
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by jcelle View Post
In your smb.conf, remove the 127.0.0.1/8 from the interface list.
You can even comment this line out as bu default, samba listens on all active interfaces
that can broadcast except 127.0.0.1.
BTW, addresses in the 'interface' parameter should be separated by spaces, not commas.


Thank you jcelle:

So I removed 127.0.0.1/8 from my smb.conf
OK, and I am learning about spaces as opposed to commas, from you here. I didn't know that.

Thank you

mansour
 
Old 12-10-2010, 11:33 AM   #12
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by sayan_acharjee View Post
Have you declared the smbpasswd for those users? Ubuntu username and password won't work here.
Try this:

Code:
#smbpasswd -a username
And give the smbpasswd for the users, try logging in with this new password now.


Hello sayan_acharjee,

So I tried to setup password for users. This is the result for three users.


root@ubuntu-server:~# smbpasswd -a Administrator
New passwd: ************
Type new passwd:***********
Failed to add entry for user Administartor.
root@ubuntu-server:~# smbpasswd -a nasrin
New passwd: ************
Type new passwd:***********
Failed to add entry for user nasrin.
root@ubuntu-server:~# smbpasswd -a mansour
New passwd: ************
Type new passwd:***********
root@ubuntu-server:~#

So samba did add the entry for user mansour, as you see it didn't complain.
But still in my computer: when I enter

Drive: Z

Folder: \\192.168.1.101\share

It won't accept my password.



mansour
 
Old 12-10-2010, 11:51 AM   #13
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by scott2004 View Post
Mansour,
You should find a log file under /var/log/samba for each machine that tries to connect to Samba. See if you can find the log Windows XP machine and post that to this forum. The log may hold a clue.

Also a question: when you try to connect from Windows are you still getting a "machine not found" type error or are you getting a dialogue for a user name and password?

Scott
Hello Scott:

These are all the logs under /var/log/samba/ directory
My Windows XP machine has the IP address 192.168.1.103, which we don't see here, and also the hardware address listed here, isn't my Windows XP hardware address. So I don't know which log belongs to windows XP machine.

root@ubuntu-server:~# ls /var/log/samba/
cores
log.192.168.1.101
log.192.168.1.117
log.mac0023df9c86b0
log.nmbd
log.smbd
log.ubuntu-server
log.wb-BUILTIN
log.wb-UBUNTU-SERVER
log.winbindd
log.winbindd-dc-connect
log.winbindd-idmap
root@ubuntu-server:~#

And about your second question,
If I try to connect from My Computer -> Tools -> Map Network drive:

Drive: Z

Folder: \\192.168.1.101\share

connect

Sometimes I get this error message:
The drive could not be mapped because no network was found.


and some other times I get a dialogue for a user name and password.
But it won't accept my password, which I created based on the advice of previous post. Previous to you.

With other methods, I get these error messages.

When I type this \\192.168.1.101\share in my windows XP browser:
I get error message:
windows can not find '\\192.168.1.101\share'. Check the spelling and try again.

or

When in Windows XP, I type in Run: \\192.168.1.101\share
I get error message:
No network provider accepted the given path.


mansour

Last edited by mansour; 12-11-2010 at 01:33 PM.
 
Old 12-11-2010, 12:48 PM   #14
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by scott2004 View Post
Mansour,
You should find a log file under /var/log/samba for each machine that tries to connect to Samba. See if you can find the log Windows XP machine and post that to this forum. The log may hold a clue.

Also a question: when you try to connect from Windows are you still getting a "machine not found" type error or are you getting a dialogue for a user name and password?

Scott

I am just posting the result of
tail -n40 /var/log/samba/log.smbd here for you guys to see, maybe someone can see the problem.

[2010/12/09 08:01:44, 0] smbd/server.c:1069(main)
smbd version 3.4.7 started.
Copyright Andrew Tridgell and the Samba Team 1992-2009
[2010/12/09 08:01:44, 0] printing/print_cups.c:103(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2010/12/09 08:01:44, 0] printing/print_cups.c:103(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2010/12/09 08:01:44, 0] smbd/server.c:1115(main)
standard input is not a socket, assuming -D option
[2010/12/10 11:12:10, 0] smbd/server.c:1069(main)
smbd version 3.4.7 started.
Copyright Andrew Tridgell and the Samba Team 1992-2009
[2010/12/10 11:12:10, 0] printing/print_cups.c:103(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2010/12/10 11:12:10, 0] printing/print_cups.c:103(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2010/12/10 11:12:10, 0] smbd/server.c:1115(main)
standard input is not a socket, assuming -D option
[2010/12/10 21:42:22, 0] smbd/server.c:1069(main)
smbd version 3.4.7 started.
Copyright Andrew Tridgell and the Samba Team 1992-2009
[2010/12/10 21:42:22, 0] printing/print_cups.c:103(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2010/12/10 21:42:22, 0] printing/print_cups.c:103(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2010/12/10 21:42:22, 0] smbd/server.c:1115(main)
standard input is not a socket, assuming -D option
[2010/12/11 11:50:10, 0] smbd/server.c:1069(main)
smbd version 3.4.7 started.
Copyright Andrew Tridgell and the Samba Team 1992-2009
[2010/12/11 11:50:10, 0] printing/print_cups.c:103(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2010/12/11 11:50:10, 0] printing/print_cups.c:103(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2010/12/11 11:50:10, 0] smbd/server.c:1115(main)
standard input is not a socket, assuming -D option
[2010/12/11 13:07:06, 0] smbd/server.c:1115(main)
standard input is not a socket, assuming -D option
[2010/12/11 13:07:06, 0] lib/pidfile.c:121(pidfile_create)
ERROR: smbd is already running. File /var/run/samba/smbd.pid exists and process id 531 is running.

Last edited by mansour; 12-11-2010 at 01:00 PM.
 
Old 12-11-2010, 02:54 PM   #15
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by scott2004 View Post
Mansour,
You should find a log file under /var/log/samba for each machine that tries to connect to Samba. See if you can find the log Windows XP machine and post that to this forum. The log may hold a clue.

Also a question: when you try to connect from Windows are you still getting a "machine not found" type error or are you getting a dialogue for a user name and password?

Scott

Hello Scott:

I am just following these troubleshooting steps in my samba server from here:
http://oreilly.com/catalog/samba/cha...k/ch09_02.html

So when I run

COMP1 is my windows XP machine and 192.168.1.103 is its IP address.

root@ubuntu-server:~# testparm /etc/samba/smb.conf COMP1 192.168.1.103
Load smb config files from /etc/samba/smb.conf
rlimit_Max: rlimit _max ..............
Procesing section ................
Processing section ..............
Procesing section ................
Processing section ..............
Procesing section ................
Processing section ..............
Server role: ROLE_STANDALONE
Allow connection from COMP1 (192.168.1.103) to share
Allow connection from COMP1 (192.168.1.103) to printers
Allow connection from COMP1 (192.168.1.103) to print$

root@ubuntu-server:~#

So clearly should be working. should share files.
But isn't happening.


mansour

Last edited by mansour; 12-11-2010 at 02:56 PM.
 
  


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
Headaches, time lossed...is Samba working or not, Windows can't see samba...crap vigdavies Linux - Networking 12 11-07-2009 04:40 PM
samba not working masonmop Linux - Networking 7 08-02-2005 12:42 PM
Samba 3 not working (nearly never), but samba 2 works OK vmicho Linux - Networking 0 10-05-2004 01:03 PM
Samba not working Amras Mandriva 5 05-19-2004 10:28 AM
samba working, then installed openSSL and not samba not working hamish Linux - Networking 3 05-17-2004 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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