fail to connect to samba on centOS 5.6


  1. Posts : 5
    windows 7 professional 64bit
       #1

    fail to connect to samba on centOS 5.6


    I have following home network:

    laptop (window7) <--> router <---> linux PC (centOS 5.6)
    |
    |
    modem
    |
    |
    internet

    I want to connect laptop to samba service on the linux PC.
    But it does not work.

    I have setup router to reserve IP address for both laptop and linux PC.
    I have setup samba service on the linux PC.

    I can ping the ip address 192.168.0.102 from laptop.

    C:\Users\Tim>ping 192.168.0.102
    Pinging 192.168.0.102 with 32 bytes of data:
    Reply from 192.168.0.102: bytes=32 time=6ms TTL=64
    Reply from 192.168.0.102: bytes=32 time=1ms TTL=64
    Reply from 192.168.0.102: bytes=32 time=1ms TTL=64

    I also can putty to the linux PC from laptop:
    login as: tim
    tim@192.168.0.102's password:
    Last login: Thu May 19 22:55:40 2011 from tim-pc.jgsignet
    [tim@JGWORK ~]$

    Don't know why?

    I check my laptop, there is no "Windows Live ID" program. I just did not see it from All Programs.

    Attached Untitled.png, shows that window7 Network in file explorer can shows the two share directory on the IP address.
    But when I click the "home_tim" directory, it shows error like error.png.
    Attached Thumbnails Attached Thumbnails fail to connect to samba on centOS 5.6-untitled.png   fail to connect to samba on centOS 5.6-error.png  
      My Computer


  2. Posts : 5
    windows 7 professional 64bit
    Thread Starter
       #2

    in the network structure, the line connected to internet is from router; the blank space characters are eaten up.
      My Computer


  3. TCG
    Posts : 190
    .
       #3

    Have you added the samba user with permissions to the share directory?

    smb.conf
    Code:
    [home_tim]
       comment =
       path = /home/tim/
       browseable = no
       guest ok = no
       writable = true
       printable = no
       valid users = tim
       invalid users = *
    Add samba user:
    Code:
    smbpasswd -a tim
    Then restart samba service.
      My Computer


  4. Posts : 5
    windows 7 professional 64bit
    Thread Starter
       #4

    here is my /etc/samba/smb.conf

    [home_tim]
    comment = tim's home
    path = /home/tim/
    browseable = yes
    guest ok = yes
    writable = yes


    I just try to allow anyone to access it.
      My Computer


  5. TCG
    Posts : 190
    .
       #5

    If you do it like that then what you'll have to do is make sure that the user "nobody" has permissions to the "path" directory specified. Otherwise your samba share will be "read only" for anyone that connects to it as they'll be running as the "nobody" user.

    Code:
    [home_tim]
    comment = tim's home
    path = /home/tim/
    available = yes
    browseable = yes
    writable = true
    guest ok = yes
    security = share
      My Computer


  6. Posts : 5
    windows 7 professional 64bit
    Thread Starter
       #6

    some good news, some bad news.

    1. I find selinux will prevent some ftp/samba access home directory on CentOS.
    So I enable home directory sharing by
    setsebool -P samba_enable_home_dirs 1

    with this, if I use ftp 192.168.0.102, it works and can list out the home directory. of course, you need to key in
    the username/password.

    2. Now my laptop can see the hostname of the linux PC

    3. Try either way of #3 and #5, it still does not work. attached is what windows7 tells me.
    Attached Thumbnails Attached Thumbnails fail to connect to samba on centOS 5.6-error.png  
      My Computer


  7. Posts : 5
    windows 7 professional 64bit
    Thread Starter
       #7

    I also follow this article:
    Access FTP sites natively in Windows 7 | Redmond Pie

    to map the directory in windows 7 explorer. But it does not work. Windows 7 allows me to map the driver. But shows nothing under the ftp-server.

    Here is comparison. Using ftp in "cmd" console.

    C:\Users\Tim>ftp 192.168.0.102
    Connected to 192.168.0.102.
    220 (vsFTPd 2.0.5)
    User (192.168.0.102none)): tim
    331 Please specify the password.
    Password:
    230 Login successful.
    ftp> ls
    200 PORT command successful. Consider using PASV.
    150 Here comes the directory listing.
    Desktop
    Public
    readme.tim
    tools
    226 Directory send OK.
    ftp: 41 bytes received in 0.00Seconds 41000.00Kbytes/sec.
    ftp> bye
    221 Goodbye.

    and attached is the windows 7 explorer. you can see the directory can not be "expand" and nothing shown in right-hand panel.
    Attached Thumbnails Attached Thumbnails fail to connect to samba on centOS 5.6-error.png  
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 13:26.
Find Us