config Samba service on Redhat 5

本文介绍了一种在Red Hat 5 Linux上配置Samba服务的方法,用于存储不常用文件。步骤包括启动Samba服务、关闭防火墙、添加Samba用户、配置共享目录,并重启服务进行验证。

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}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值