LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Samba Configuration Problems (http://www.linuxquestions.org/questions/linux-software-2/samba-configuration-problems-457941/)

joshuarowley 06-24-2006 03:53 PM

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

manishsingh4u 06-24-2006 04:23 PM

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.

joshuarowley 06-24-2006 04:47 PM

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

manishsingh4u 06-24-2006 05:28 PM

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

joshuarowley 06-25-2006 02:03 AM

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

manishsingh4u 06-25-2006 04:18 AM

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

joshuarowley 06-25-2006 05:36 AM

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.

joshuarowley 06-25-2006 05:40 AM

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

joshuarowley 06-25-2006 09:56 AM

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

manishsingh4u 06-25-2006 01:21 PM

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

joshuarowley 06-25-2006 02:43 PM

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

manishsingh4u 06-25-2006 03:16 PM

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. :)

joshuarowley 06-25-2006 06:37 PM

I take it you are not trying to burn at a speed greater than that which the Blank is rated to?

manishsingh4u 06-26-2006 04:03 AM

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.


All times are GMT -5. The time now is 01:04 AM.