LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-24-2006, 04:53 PM   #1
joshuarowley
Member
 
Registered: Dec 2005
Location: England
Distribution: Gentoo
Posts: 55

Rep: Reputation: 15
Samba Configuration Problems


Hello anyone!!

I have had several bad experiences with linux before, but am still perseveering, and am sure that I am Beginning to see the end of this dark tunnel, my problems included 5 hard drive corruptions, randomly loosing my GUI, and just generally had problems, but as I said, I think this is the last set-up I will be doing for a while, I have got myself a far more reliable hard drive etc.

But my problem at the moment as the title may suggest is the configuration of Samba, I have tried all sorts of things, and then ended up resorting to pure trial and error, and can report 100% error, so I now have a messed up smb.conf file. Could someone please give me some advice on getting hold of a smb.conf file which has settings for just share level sharing, with an example share.

The thing that baffles me about the whole situation is that I managed to get hold of my smb.conf file from a previous installation (which worked), and now does not, I have a feeling I am blessed with bad luck!

If anyone could help, I will be eternally grateful (and in debt!)

Josh
 
Old 06-24-2006, 05:23 PM   #2
manishsingh4u
Member
 
Registered: Oct 2005
Location: Pune, India
Distribution: OpenSUSE 11.0
Posts: 422

Rep: Reputation: 30
Here's my /etc/samba/smb.conf (On Ubuntu 5.10)
Code:
[global]
workgroup = mca
server string = %h server (Samba, Ubuntu)
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
security = user
encrypt passwords = true
passdb backend = tdbsam guest
obey pam restrictions = yes
invalid users = root
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
socket options = TCP_NODELAY
[homes]
   read only = no
   public = no
   create mask = 0755
   valid users = %U

[d]
   path = /media/hda5
   read only = yes
   public = yes

[e]
   path = /media/hda6
   read only = yes
   public = yes

[f]
   path = /media/hda7
   read only = yes
   public = yes
If you want me to help setup your samba system, please let me know.

Last edited by manishsingh4u; 06-24-2006 at 05:25 PM.
 
Old 06-24-2006, 05:47 PM   #3
joshuarowley
Member
 
Registered: Dec 2005
Location: England
Distribution: Gentoo
Posts: 55

Original Poster
Rep: Reputation: 15
Hi,

I tried using your conf file, removing all the password business, and then setting the security level to share, then tried, no luck.

With regard to pinging I can ping the windows box I am trying to access it from, but (as expected) not the other way around.

Does samba have any dependant services (to use windows terminology) which which are required for it work?

Do you have any ideas how you would be able to help me over the net, some kind of SSH client or something?

But if you did get it work I would be incredibly impressed, and yet depressed at the same time!!

Thanks Josh
 
Old 06-24-2006, 06:28 PM   #4
manishsingh4u
Member
 
Registered: Oct 2005
Location: Pune, India
Distribution: OpenSUSE 11.0
Posts: 422

Rep: Reputation: 30
Quote:
Do you have any ideas how you would be able to help me over the net, some kind of SSH client or something?
I have no right to say that but, you should not trust any stranger to have ssh access to your system. Anyway, I would prefer the normal forum style.
Quote:
But if you did get it work I would be incredibly impressed, and yet depressed at the same time!!
All I can do is "try". Nobody is perfect.

Anyway, please provide me answers to these questions
1) Which Linux distribution and version u r having problem upon?
2) The ouyput of ping command on both computers.
3) Are they on same network/subnet/workgoup?
4) Can windows machine share files with any other PC at present?
5) Output of these commands

Code:
ps -A | grep smbd
Code:
ps -A | grep nmbd
Code:
nmblookup windowsmachinename
 
Old 06-25-2006, 03:03 AM   #5
joshuarowley
Member
 
Registered: Dec 2005
Location: England
Distribution: Gentoo
Posts: 55

Original Poster
Rep: Reputation: 15
I was a little worried about the possibilities of letting anyone access my computer, but since there is absolutely nothing on it, i am not too bothered!!

The answers:
1) Mnadriva
2) Linux --> PC = response with reasonable time
PC --> Linux = Time out -- tried turning shorewall off.
3) Same local network, same ip range and subnet mask, and I have put them in the same workgroup in samba, but dont know if there is anywhere else to configure the workgroup
4) There is a windows network with 15 computers working very nicely, the linux one is being introduced as a public storage area.
5)
ps -A | grep smbd
4747 ? 00:00:00 smbd
4774 ? 00:00:00 smbd

ps -A | grep nmbd
[null]

nmblookup Josh
querying Josh on 192.168.2.255
querying Josh on 127.255.255.255
name_query failed to find name Josh

Joshs ip is 192.168.2.3
Linux ip is 192.168.2.4
The rest of the network number from there
 
Old 06-25-2006, 05:18 AM   #6
manishsingh4u
Member
 
Registered: Oct 2005
Location: Pune, India
Distribution: OpenSUSE 11.0
Posts: 422

Rep: Reputation: 30
Quote:
PC --> Linux = Time out -- tried turning shorewall off.
This happens mostly because of firewalls. Anyway, u have turned it off, still it doesn't work. Run this command as root. It will flush all the firewall rules
Code:
iptables -F
----------------------------------
Code:
ps -A | grep nmbd
[null]
This is one problem we have here. Try removing and reinstallaling samba, smbclient and their dependencies. nmbd should be running there with samba as a daemon.

After you are done, try pinging again (use ipaddresses to ping instead of names this time).
And create a test share in the /etc/samba/smb.conf to see if it works. (You can uncomment the [homes] section for this test.

Restart samba
Code:
/etc/rc.d/init.d/smb restart
Then from windows machine try
Code:
\\linuxmachine\anysharename

Last edited by manishsingh4u; 06-25-2006 at 05:20 AM.
 
Old 06-25-2006, 06:36 AM   #7
joshuarowley
Member
 
Registered: Dec 2005
Location: England
Distribution: Gentoo
Posts: 55

Original Poster
Rep: Reputation: 15
I have just done the following:
Un-installed Samba
Re-installed Samba
Had a look at the smb.conf file and it was the same as I left it.
I ran both of the ps commands you gave me and got a response from both of them.
Then tried pinging, worked linux --> pc but not vice versa (using IPs)
I then tried accessing the linux box and vice versa, but again no luck.
The last thing i tried was accessing the local webserver, that also failed!
I am totaly baffled, I have no idea what has gone wrong here!
The only thing that works is the internet, and that is router-based.
 
Old 06-25-2006, 06:40 AM   #8
joshuarowley
Member
 
Registered: Dec 2005
Location: England
Distribution: Gentoo
Posts: 55

Original Poster
Rep: Reputation: 15
This is my config file incase I have done something stupid!

Quote:
[global]
workgroup = mshome
server string = linuxserver
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
security = share


[d]
path = /data0
read only = yes
public = yes

[e]
path = /data1
read only = yes
public = yess

[f]
path = /data3
read only = yes
public = yes
 
Old 06-25-2006, 10:56 AM   #9
joshuarowley
Member
 
Registered: Dec 2005
Location: England
Distribution: Gentoo
Posts: 55

Original Poster
Rep: Reputation: 15
Exciting news about the situation

I have discovered that my Linux machine can access the rest of my network, using both samba and http, but only using IP addresses, but not using the name.
Now the only problem is how to persuade windows to access samba. Because it cant access the samba side of the situation, or the apache side of it, i think it may be a firewall problem, how can i completely disable the firewall for the computer?

Josh
 
Old 06-25-2006, 02:21 PM   #10
manishsingh4u
Member
 
Registered: Oct 2005
Location: Pune, India
Distribution: OpenSUSE 11.0
Posts: 422

Rep: Reputation: 30
Quote:
how can I completely disable the firewall for the computer?
I have already told you the command to do this (run as root)
Code:
iptables -F
Now try to ping the machines. Also post the output of this command if still it doesn't work
Code:
nmap -sV -O linuxipaddress
It will show which ports are open on the linux machine. Replace linuxipaddress with the linux system's ip
 
Old 06-25-2006, 03:43 PM   #11
joshuarowley
Member
 
Registered: Dec 2005
Location: England
Distribution: Gentoo
Posts: 55

Original Poster
Rep: Reputation: 15
I tried flushing the iptables, but that didnt do anything, I spent about 10 hours of solid fiddling, and asking and just gave up and re-installed the os, but this time with the lowest security level, and it now appears to be working fine!

Thank you very much for you help! i really appreciate it, but i dont think any linux god could have rescued that machine!

Thanks again!
Josh
 
Old 06-25-2006, 04:16 PM   #12
manishsingh4u
Member
 
Registered: Oct 2005
Location: Pune, India
Distribution: OpenSUSE 11.0
Posts: 422

Rep: Reputation: 30
Quote:
Originally Posted by joshuarowley
but i dont think any linux god could have rescued that machine!
I am trying to write a copy of a CD with kb3 and it has corrupted 2 writable CDs in last 2 hours. I don't understand why? Anyway, I am glad to hear that now your system is working fine. Enjoy.
 
Old 06-25-2006, 07:37 PM   #13
joshuarowley
Member
 
Registered: Dec 2005
Location: England
Distribution: Gentoo
Posts: 55

Original Poster
Rep: Reputation: 15
I take it you are not trying to burn at a speed greater than that which the Blank is rated to?
 
Old 06-26-2006, 05:03 AM   #14
manishsingh4u
Member
 
Registered: Oct 2005
Location: Pune, India
Distribution: OpenSUSE 11.0
Posts: 422

Rep: Reputation: 30
It's having some problem with the DAO (Disc at once method). TAO (Track at once) works fine. Even cdrecod -scanbus gives error like Cannot find py** something.
 
  


Reply

Tags
samba


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 configuration shivadk Linux - Software 2 12-17-2005 09:55 PM
SAMBA configuration nawin_g Linux - Networking 9 11-08-2005 04:23 PM
Samba Configuration randy1970 Linux - Newbie 5 07-24-2005 10:22 AM
Problems with RH9 samba server configuration tool plunday Linux - Networking 7 08-31-2004 11:30 PM
Samba configuration help Krenn Slackware 3 07-30-2004 08:22 PM


All times are GMT -5. The time now is 11:51 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration