############

1.安装网络yum

############

2.安装createrepo

[root@localhost ~]# yum install createrepo-0.9.8-5.el6.noarch.rpm 
Setting up Install Process
Examining createrepo-0.9.8-5.el6.noarch.rpm: createrepo-0.9.8-5.el6.noarch
Marking createrepo-0.9.8-5.el6.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package createrepo.noarch 0:0.9.8-5.el6 will be installed
--> Processing Dependency: deltarpm for package: createrepo-0.9.8-5.el6.noarch
--> Processing Dependency: python-deltarpm for package: createrepo-0.9.8-5.el6.noarch
--> Running transaction check
---> Package deltarpm.i686 0:3.5-0.5.20090913git.el6 will be installed
---> Package python-deltarpm.i686 0:3.5-0.5.20090913git.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package    Arch   Version                 Repository                      Size
================================================================================
Installing:
 createrepo noarch 0.9.8-5.el6             /createrepo-0.9.8-5.el6.noarch 245 k
Installing for dependencies:
 deltarpm   i686   3.5-0.5.20090913git.el6 base                            73 k
 python-deltarpm
            i686   3.5-0.5.20090913git.el6 base                            27 k

Transaction Summary
================================================================================
Install       3 Package(s)

Total size: 346 k
Total download size: 101 k
Installed size: 478 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): deltarpm-3.5-0.5.20090913git.el6.i686.rpm         |  73 kB     00:00     
(2/2): python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm  |  27 kB     00:00     
--------------------------------------------------------------------------------
Total                                           5.9 kB/s | 101 kB     00:16     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : deltarpm-3.5-0.5.20090913git.el6.i686                        1/3 
  Installing : python-deltarpm-3.5-0.5.20090913git.el6.i686                 2/3 
  Installing : createrepo-0.9.8-5.el6.noarch                                3/3 
  Verifying  : createrepo-0.9.8-5.el6.noarch                                1/3 
  Verifying  : deltarpm-3.5-0.5.20090913git.el6.i686                        2/3 
  Verifying  : python-deltarpm-3.5-0.5.20090913git.el6.i686                 3/3

Installed:
  createrepo.noarch 0:0.9.8-5.el6

Dependency Installed:
  deltarpm.i686 0:3.5-0.5.20090913git.el6                                       
  python-deltarpm.i686 0:3.5-0.5.20090913git.el6

Complete!
#####################

3.安装samba

[root@localhost centos6.4]# yum install samba
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package samba.i686 0:3.6.9-151.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package         Arch           Version                    Repository      Size
================================================================================
Installing:
 samba           i686           3.6.9-151.el6              base           5.1 M

Transaction Summary
================================================================================
Install       1 Package(s)

Total download size: 5.1 M
Installed size: 18 M
Is this ok [y/N]: y
Downloading Packages:
samba-3.6.9-151.el6.i686.rpm                             | 5.1 MB     00:10     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : samba-3.6.9-151.el6.i686                                     1/1 
  Verifying  : samba-3.6.9-151.el6.i686                                     1/1

Installed:
  samba.i686 0:3.6.9-151.el6

Complete!
##############

4.安装 Samba 图形化管理工具

# rpm -ivh samba-swat-3.0.25b-0.el5.4.i386.rpm

[root@localhost centos6.4]# rpm -aq | grep samba
samba4-libs-4.0.0-55.el6.rc4.i686
samba-winbind-3.6.9-151.el6.i686
samba-3.6.9-151.el6.i686
samba-common-3.6.9-151.el6.i686
samba-client-3.6.9-151.el6.i686
samba-winbind-clients-3.6.9-151.el6.i686
[root@localhost centos6.4]# yum install samba-swat
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package samba-swat.i686 0:3.6.9-151.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package             Arch          Version                  Repository     Size
================================================================================
Installing:
 samba-swat          i686          3.6.9-151.el6            base          7.3 M

Transaction Summary
================================================================================
Install       1 Package(s)

Total download size: 7.3 M
Installed size: 17 M
Is this ok [y/N]: y
Downloading Packages:
samba-swat-3.6.9-151.el6.i686.rpm                        | 7.3 MB     00:16     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : samba-swat-3.6.9-151.el6.i686                                1/1 
  Verifying  : samba-swat-3.6.9-151.el6.i686                                1/1

Installed:
  samba-swat.i686 0:3.6.9-151.el6

Complete!
####################

5.设置一个无密码,共享服务器

[global]          //该设置与Samba服务整体运行环境有关,它的设置项目针对所有共享资源   
        workgroup = MYGROUP
        server string = Samba Server Version %v
        netbios name = MYSERVER

log file = /var/log/samba/log.%m
        max log size = 50

security = share
        passdb backend = tdbsam                                
netbios name = MYSERVER

load printers = yes
        cups options = raw

[public]
        comment = aaaaaa
        path = /abc
        public = yes
        writables = no  //是否允许用户写入自己的主目录
        guest ok = yes

[root@localhost samba]# chown -R nobody:nobody /abc     
[root@localhost samba]# service smb restart
Shutting down SMB services: [  OK  ]
Starting SMB services: [  OK  ]
[root@localhost samba]# service nmb restart
Shutting down NMB services: [  OK  ]
Starting NMB services: [  OK  ]
######################################

6.

[root@localhost samba]# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[public]"
Unknown parameter encountered: "writables"
Ignoring unknown parameter "writables"
WARNING: The security=share option is deprecated
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
        workgroup = MYGROUP
        netbios name = MYSERVER
        server string = Samba Server Version %v
        security = SHARE
        log file = /var/log/samba/log.%m
        max log size = 50
        idmap config * : backend = tdb
        cups options = raw

[homes]
        comment = Home Directories
        read only = No
        browseable = No

[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        print ok = Yes
        browseable = No

[public]
        comment = aaaaaa
        path = /abc
        guest ok = Yes

##################################

7.

[root@localhost samba]#  smbclient -L //127.0.0.1
WARNING: The security=share option is deprecated
Enter root's password: 
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.9-151.el6]

Sharename       Type      Comment
        ---------       ----      -------
        public          Disk      aaaaaa
        IPC$            IPC       IPC Service (Samba Server Version 3.6.9-151.el6)
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.9-151.el6]

Server               Comment
        ---------            -------
        MYSERVER             Samba Server Version 3.6.9-151.el6

Workgroup            Master
        ---------            -------
        MYGROUP              MYSERVER
        WORKGROUP            MENG

##############################################

8.

[root@localhost samba]# smbclient //192.168.1.109/public
WARNING: The security=share option is deprecated
Enter root's password: 
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.9-151.el6]
Server not using user level security and no password supplied.
smb: \> ls
NT_STATUS_ACCESS_DENIED listing \*     //拒绝访问
smb: \>

###########################################

9.检查防火墙

[root@localhost samba]# getenforce
Enforcing
[root@localhost samba]# setenforce 0  //关闭防火墙

[root@localhost samba]# smbclient //192.168.1.109/public  //重新登陆
WARNING: The security=share option is deprecated
Enter root's password: 
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.9-151.el6]
Server not using user level security and no password supplied.
smb: \> ls
  .                                   D        0  Tue Jul 23 13:31:29 2013
  ..                                 DR        0  Tue Jul 23 13:31:09 2013
  kkk                                         20  Tue Jul 23 13:31:29 2013

56797 blocks of size 524288. 38949 blocks available
smb: \>

成功!

samba笔记的更多相关文章

  1. centos7下安装samba服务器

    samba笔记: http://services.linuxpanda.tech/%E7%BD%91%E7%BB%9C%E6%96%87%E4%BB%B6%E5%85%B1%E4%BA%AB/samb ...

  2. [Openwrt 项目开发笔记]:Samba服务&vsFTP服务(四)

    [Openwrt项目开发笔记]系列文章传送门:http://www.cnblogs.com/double-win/p/3888399.html 正文: 在上一节中,我们讲述了如何在路由器上挂载U盘,以 ...

  3. 《Linux就该这么学》培训笔记_ch12_使用Samba或NFS实现文件共享

    <Linux就该这么学>培训笔记_ch12_使用Samba或NFS实现文件共享 文章最后会post上书本的笔记照片. 文章主要内容: SAMBA文件共享服务 配置共享资源 Windows挂 ...

  4. Samba服务配置简明笔记

    内部服务器之间拷贝数据,用root账号访问,没有做更复杂的设置. 1.用YUM安装samba服务器端及客户端: [root@tenjs05 init.d]# yum install samba sam ...

  5. 6. Samba服务和防火墙配置笔记

    Samba文件服务器 (一)简介 内网文件服务器 windows-windows 文件共享服务 网络邻居linux-linux NFS windows-linux Samba (二)端口 smbd: ...

  6. linux学习笔记3:linux的网络配置,rpm包,shell以及samba服务器的使用和安装

    1.linux下的shell<linux命令.编辑器和shell编程> (1)shell种类有很多,常用的有三种,在linux可以通过ls -l /bin/*sh 来显示所有已安装的she ...

  7. ubuntu中安装samba 分类: linux 学习笔记 ubuntu 2015-07-07 16:14 46人阅读 评论(0) 收藏

    为了方便的和Windows之间进行交互,samba必不可少. 当然,他的安装使用也很简单: 安装: sudo apt-get install samba sudo apt-get install sm ...

  8. Linux 学习笔记_12_Windows与Linux文件共享服务_1.1_--Samba(下)Samba经典应用案例

    五.[Samba应用案例二] 设置Samba共享目录/software,允许用户jack和mary可以通过Windows客户端访问,并具有读写权限. 1.创建目录/software,添加用户jack, ...

  9. Linux 学习笔记_12_Windows与Linux文件共享服务_1.1_--Samba(上)

    Samba简介:在UNIX系统中,Samba是通过服务器消息块协议(SMB)在网络上的计算机之间,共享文件和打印服务的软件包. SMB简介:Server Message Block,SMB协议是一种服 ...

随机推荐

  1. Microsoft SQL Server 2008/2012 Internals 一处疑问

    Kalen Delaney 等著的深入解析 Microsoft SQL Server 系列,享有盛誉,深入研读,是管窥深奥复杂之 SQL Server 的阶梯与门径.手头有 Microsoft SQL ...

  2. jdk11安装没有jre文件夹

    原因:jdk11安装之后是没有jre的 如果需要jre,需要到jdk目录下面去    打开命令窗口,然后执行如下命令:    bin\jlink.exe --module-path jmods --a ...

  3. [ SCOI 2005 ] 最大子矩阵

    \(\\\) \(Description\) 给出一个\(N\times M\)的有权矩阵,选出其中\(K\)个互不重叠的子矩阵,使得这\(K\)个子矩阵的权值和最大. \(N\in [1,100]\ ...

  4. 努比亚(nubia) Z18 mini NX611J 解锁BootLoader 并刷入recovery ROOT

    努比亚(nubia)  Z18 mini NX611J解锁BootLoader 并刷入recovery ROOT 工具下载链接:https://pan.baidu.com/s/1toU-mTR9FNE ...

  5. UVM基础之----uvm_object

    uvm_void The uvm_void class is the base class for all UVM classes. uvm_object: The uvm_object class ...

  6. CSS——层级

    层级问题:选中的盒子显示的效果并不完整,右边的边框并没有显示红色,原因是其右边的盒子压了它的边框. <!DOCTYPE html> <html lang="en" ...

  7. json 新用

    如果使用struts2的action,可以省去属性赋值的工夫. 但是假如你没有使用struts2,而且使用的是ajax请求,通过json来传递参数.那我下面所说的对你可能是一个很好的解脱,从此告别re ...

  8. 调用.NET Serviced Component引发的性能问题及其解决

    在企业用户环境里,.NET Serviced Component使用广泛.它比较好的把传统COM+封装和.NET应用逻辑衔接了起来,在服务器端应用起到重要作用..NET Serviced Compon ...

  9. dubbo之配置规则

    配置规则 向注册中心写入动态配置覆盖规则 1.该功能通常由监控中心或治理中心的页面完成. RegistryFactory registryFactory = ExtensionLoader.getEx ...

  10. Operation Queues 面向对象的封装

    Operation Queues An operation queue is the Cocoa equivalent of a concurrent dispatch queue and is im ...