Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using CentOS and I need to connect to a file server running on windows. My friend told me that I need to install SAMBA to be able to do that. and so I installed samba and when I try to check if the installation is successful, this command

smbclient //[hostname]/[sharename] -U [username]

gave me this

timeout connecting to XXX.XXX.XXX.XXX:XXX Error Connecting to XXX.XXX.XXX.XXX (No route to host) Connection to XXX.XXX.XXX.XXX failed (Error NT_STATUS_HOST_UNREACHABLE)

How do I fix this?

Here's the step by step instruction how I installed SAMBA. Kindly check if I'm missing something.

  1. Check if SAMBA is already installed using the command below : $ rpm -q samba

  2. If SAMBA is not yet installed. Type the command shown below to have a root access $ su –

  3. Then you will be asked to type in your password.

  4. Download and install the Linux SAMBA package using the command : yum install samba

  5. Configure the Linux Firewall so that it will allow the SAMBA traffic by following the steps below. a. Click the System >> Administration > Security Level and Firewall b. Type the root password> in the textbox provided c. In “Firewall Options” tab, Check the SAMBA > Combo box. d. Apply and press ok.

  6. Configure the SAMBA config file. In the terminal, you should have a root access, (do as told in number 2) and type in the command below.

    gedit /etc/samba/smb.conf
    

this will open the smb.conf and it is ready for any modification.

Spot the part of the config file which contains workgroup. Edit that part, change the value to “workgroup”

   workgroup = workgroup

And add this section [NetApps]

path = /data/network-applications 
  writeable = yes
  browseable = yes
valid users = administrator Save all the changes.
  1. Create a SAMBA user a. You must gain root privileges by doing the command in number 2. b. Add administrator as a user smbpasswd -a > administrator
    c. Then it will ask you to type the password for that > account. d. To know if you have any error with the configuration, use > this command Testparm

  2. Start SAMBA and NetBios Service a. To start the SAMBA and NetBios Service /etc/init.d/smb {start|stop|restart|reload|status|condrestart}

  3. Accessing Windows Shares From CentOS a. Gain root privileges by doing number 2. b. Download and install samba-client $ Yum install > samba-client

share|improve this question

migrated from stackoverflow.com Sep 19 '12 at 18:56

This question came from our site for professional and enthusiast programmers.

    
Please let me know your farewell is Enable/Disable if Enable then configure your farewell via command line "iptables" or " system-config-farewell" use any method.. –  user165888 Mar 22 '13 at 5:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.