LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cannot ping smaba server, can be seen when browsing.... (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-ping-smaba-server-can-be-seen-when-browsing-730922/)

chrislever80 06-05-2009 09:56 AM

cannot ping smaba server, can be seen when browsing....
 
I am setting up a Linux file server on my network (1 other XP machine) and can ping the xp machine and browse all network shares, however the xp machine can't ping the linux box, I can however see "Samba Server (Server)" in network neighbourhood...but can not get any further.. any ideas

jimbo1708 06-05-2009 09:59 AM

post the output of
Code:

smbtree
it will prompt you for a password, just leave it blank

also, try to connect to the linux file server via its ip address instead of computer name.

also, you need to disable any firewalls on the linux box to make sure that isn't the problem. What distro are you using?

chrislever80 06-08-2009 07:00 AM

Cheers jimbo, Okay numptie's error, i have now checked the "echo ping" box and allowed the samba server in firewall settings and its now pinging the ip address from windows machines. Under the output for smbtree i have placed the output for uname -a and the distro is mandriva 2008.0. I can ping the linux box and see shares under server but cannot connect to any shares, authentification fails, i'm guessing its all down to permissions now..? I'm using/trying webmin so will have a good look through, any further help would be much appreciated....Thanks in advance

[chris@server ~]$ smbtree
Password:
ALLPLAS
\\WAGES12
\\WAGES12\Canon Canon iP2200
\\WAGES12\C$ Default share
\\WAGES12\ADMIN$ Remote Admin
\\WAGES12\Riskdisc
\\WAGES12\C
\\WAGES12\print$ Printer Drivers
\\WAGES12\D$ Default share
\\WAGES12\IPC$ Remote IPC
\\WAGES12\E$ Default share
\\SERVER Samba 3.0.25b
\\SERVER\chris Home Directories
\\SERVER\print$
\\SERVER\pdf-gen PDF Generator (only valid users)
\\SERVER\AL DIMEOLA,
\\SERVER\IPC$ IPC Service (Samba 3.0.25b)
\\ROSS
\\ROSS\C$ Default share
\\ROSS\ADMIN$ Remote Admin
\\ROSS\A
\\ROSS\C
\\ROSS\print$ Printer Drivers
\\ROSS\IPC$ Remote IPC
\\ROSS\hp hp psc 1200 series
\\KEITH
cli_rpc_pipe_open: cli_nt_create failed on pipe \srvsvc to machine KEITH. Error was NT_STATUS_ACCESS_DENIED
\\CHRIS
\\CHRIS\Printer CutePDF Writer
\\CHRIS\C$ Default share
\\CHRIS\ADMIN$ Remote Admin
\\CHRIS\Music
\\CHRIS\F$ Default share
\\CHRIS\D
\\CHRIS\Allplas
\\CHRIS\SharedDocs
\\CHRIS\print$ Printer Drivers
\\CHRIS\IPC$ Remote IPC
\\ALLAN
\\ALLAN\C$ Default share
\\ALLAN\ADMIN$ Remote Admin
\\ALLAN\ALLANHP HP Color LaserJet 1600
\\ALLAN\c
\\ALLAN\print$ Printer Drivers
\\ALLAN\IPC$ Remote IPC


root@server chris]# uname -a
Linux server 2.6.22.9-desktop-1mdv #1 SMP Thu Sep 27 04:07:04 CEST 2007 i686 AMD Athlon(tm) 64 Processor 3200+ GNU/Linux

Ta

jimbo1708 06-08-2009 07:08 AM

hello,

I am thinking it might be a permissions issue. Try creating a share with no authentication. I always like to have a "public" share that everyone can access just for quick placement of documents and such. I am not familiar with webadmin, but if you can create a public share in there, go ahead. Other wise add the following to /etc/samba/smb.conf

Code:

[public]
        comment = Public Folder for large network storage
        public = yes
        read only = no
        path = /home/jschmoe/Desktop/Huge Shared Folder
        browseable = yes
        guest only = yes
        guest account = jschmoe
        force user = jschmoe
        force group = jschmoe


Sm1ler 06-08-2009 09:32 AM

Have you created the samba users yet? Samba doesn't use the boxes default users you need to create them with the smbpasswd tool - try man smbpasswd

example # smbpasswd -a jschmoe
it will then prompt you for a password - Also if you want password free authentication you need to specify it in the smb.conf otherwise it uses the security = user setting by default even if not specified.

Also are you running SELIUNX? and does your connecting user have rwx access to the folder that is being shared?

chrislever80 06-11-2009 08:18 AM

Ta da......
 
Beautiful jimbo, as I said i am a newbie (= errors errors and more errors) so i pasted your code into my samba config and the share came up without a problem which is all i really needed as folders in there i am going to use as home folders so will set their permissions independantly, Ta very much.

Sm1ler thanks for your input, appreciated ;op

Although (on a different note) now i have sorted samba shares out i have a strange one, as i said this will be used as a fileserver and not much more (well maybe a bit of a plaything but....) At present i have allowed SSH, telnet, samba file sharing and ping in the firewall settings, all shares are available, i can putty in from my Windows machine but when i restart the linux box, no shares are available and i cannot connect in any way. I have to go back to the firewall settings and reset them which then allows me to connect. I'm confused, I'm guessing these should obviously be permanent rules and not reset every restart???

Any ideas??

Thanks in advance

Chris

Sm1ler 06-11-2009 09:31 AM

I haven't used Mandriva for well ages way before it even became mandriva!

my advice and doing my best to keep it simple for you would be to makes the changes so everything works then open a terminal as root and type iptables --list-rules copy the output to a empty file. you will notice ports like the following which relate to samba and ssh

-A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

I wouldn't worry about icmp and telnet unless you really need or want them. Next stop your firewall either by the services or the init script and then copy /etc/sysconfig/iptables to a backup ie. /etc/sysconfig/iptables.backup

Then open up /etc/sysconfig/iptables and add the missing lines as above or from your working copied rules set, save the changes - restart your firewall and all should be well, next a reboot should prove it!

Sm1ler 06-11-2009 09:34 AM

Also for more detailed info and restricting subnets that can connect to samba see this doc http://wiki.centos.org/HowTos/SetUpS...hlight=(samba) it's from Centos but the general idea is the same. I was assuming you are behind a hardware firewall at the very least


All times are GMT -5. The time now is 06:44 PM.