现在的位置: 首页 > 综合 > 正文

Samba Setting

2013年01月02日 ⁄ 综合 ⁄ 共 1118字 ⁄ 字号 评论关闭

Linux 工具Share文件

    SMB(Server Message Block)服务信息块

    service smb restart

    service nmb restart

    

    操作说明:

        window 用户名:lidong 密码:1

        linux 用户名:linux 密码:1 (这个简单的例子没用到)

    准备工作:

        在windows下 创建一个共享文件夹 share

        在linux 下 创建目录文件mkdir -p /home/share

    关掉防火墙:

         1) 重启后永久性生效:

              开启: chkconfig iptables on

              关闭: chkconfig iptables off

          2) 即时生效,重启后失效:

              开启: service iptables start

              关闭: service iptables stop

    具体操作:

        1. cd /etc/samba/

        2. mv smb.conf smb.conf_bak

        3. vim smb.conf

            [global]    

            workgroup = project

            "netbios name = dolphin

            server string = Linux Samba Server Share

            security = share

 

            [vmshare]

        path = /home/share

        writeable = yes

        "browseable = yes

        guest ok = yes

    4. smbd

    5. nmbd

    6. mount -o codepage=cp936,username=lidong,password=1,-l //172.16.61.1/share /home/share (注意:lidong,password没有空格)

7. (附加)将window上的share文件映射为网络驱动器,方便访问

8. 开机自动挂载:vim /root/.bashrc

         #!/bin/sh

         mount -o codepage=cp936,username=lidong,password=1,-l //172.16.61.1/share /home/share

         smbd

         nmbd


 

抱歉!评论已关闭.