Samba服务器源码编译及安装配置(访问无需用户密码)

Samba服务器源码编译及安装配置(访问无需用户密码)

  1. 获取源码包samba-3.4.17.tar.gz,官网源码包下载地址;
  2. tar -zvxf samba-3.4.17.tar.gz解压源码包;
  3. cd samba-3.4.17/source3/(源码路径);
  4. ./configure 生成makefile;
  5. make 编译;
  6. make install 安装(默认安装路径/usr/local/samba)
  7. 将examples下的smb.conf.default拷贝到/usr/local/samba/lib下,并重命名为smb.conf
  8. smb.conf内容如下(注释:共享路径的权限要修改,chmod 777 /home/share)
#======================= Global Settings =====================================
[global]
.......
#   security = user
   security = share
.......

[Scans]
    comment = share
    path = /home/share
    public = yes
    writable = yes
    browseable=yes
    available=yes
    guest ok=yes  
  1. 修改/etc/ld.so.conf,尾行添加/usr/local/samba/lib
  2. 执行ldconfig
  3. 运行/usr/local/samba/sbin/nmbd start
    /usr/local/samba/sbin/smbd start
    (注释:可使用/usr/local/samba/bin/testparm测试是否安装成功,出现
    Loaded services file OK.即安装成功
  4. windows下使用\ip,如\192.168.2.1访问共享文件

你可能感兴趣的:(C++,Linux,操作系统)