您的位置:首页 > 运维架构 > Linux

config Samba service on Redhat 5

2010-07-09 09:24 274 查看
My T60 laptop running out of Harddisk, today plan to config a samba service on my redhat5 linux for storing some files not often used. 

Steps:

1. /etc/init.d/smb start

Starting SMB services:                                     [  OK  ]

Starting NMB services:                                     [  OK  ]

pgrep nmbd
10207
[root@dgswxl init.d]# netstat -tlnp |grep smgb
[root@dgswxl init.d]# netstat -tlnp |grep smb
tcp        0      0 0.0.0.0:139                 0.0.0.0:*                   LISTEN      10203/smbd
tcp        0      0 0.0.0.0:445                 0.0.0.0:*                   LISTEN      10203/smbd

2. close the firewall if needed.
iptables -F

3. add samba user,

smbpasswd -a wxl
New SMB password:
Retype new SMB password:
Added user wxl.

4. in /etc/smb.conf, add the following,

[wxlsdir]
   comment = wxl's Service
   path = /home/wxl/pcfile
   valid users = wxl
   public = no
   writable = yes
   printable = no

5. Restart the service,
/etc/init.d/smb restart

6. Check the samba status,

smbclient -L localhost -U wxl

omain=[DGSWXL] OS=[Unix] Server=[Samba 3.0.23c-2]

        Sharename       Type      Comment
        ---------       ----      -------
        wxlsdir         Disk      wxl's Service
        IPC$            IPC       IPC Service (Samba Server)
        wxl             Disk      Home Directories
Domain=[DGSWXL] OS=[Unix] Server=[Samba 3.0.23c-2]

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------
        WXL                  DGSWXL

7. Then from the Windows to access the linux by, //{hostip}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息