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

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. [ HAOI 2010 ] 最长公共子序列

    \(\\\) \(Description\) 求两个长度\(\le5000\)的大写字母串的\(LCS\)长度及个数,定义两\(LCS\)中某一字符在两序列出现位置有一处不同就视为不同. \(\\\) ...

  2. [ POI 2011 ] Dynamite

    \(\\\) \(Description\) 一棵\(N\)个节点的树,树上有\(M\)个节点是关键点,选出\(K\)个特殊点,使得所有关键点到特殊点的距离中最大的最小,输出最大值最小为多少. \(N ...

  3. P1538 迎春舞会之数字舞蹈

    题目背景 HNSDFZ的同学们为了庆祝春节,准备排练一场舞会. 题目描述 在越来越讲究合作的时代,人们注意的更多的不是个人物的舞姿,而是集体的排列. 为了配合每年的倒计时,同学们决定排出——“数字舞蹈 ...

  4. UVM基础之----uvm_object

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

  5. 【技术累积】【点】【java】【22】UUID

    基础概念&使用 UUID是Universally Unique Identifier的缩写,它是在一定的范围内(从特定的名字空间到全球)唯一的机器生成的标识符. 说白了就是个唯一键,只不过到处 ...

  6. 【技术累积】【点】【java】【21】序列化二三事

    基础概念 把对象等转为二进制进行传输的是序列化,反之为反序列化: 应用场景一般为读写文件,传输数据/接口调用: Externalizable和Serializable java的序列化方式有两种: S ...

  7. windows环境搭建ui自动化环境

    windows环境安装python虚拟环境 https://www.cnblogs.com/suke99/p/5355894.html https://www.cnblogs.com/jiuyang/ ...

  8. Jenkins里jobs和workspace什么区别

    https://segmentfault.com/q/1010000012575095/a-1020000012590560 简单的说,job 中保存的是项目是在 jenkins 上的配置.日志.构建 ...

  9. iDRAC RAC0218 最大会话限制

    用ssh工具登陆IDRAC远程管理ip地址: /admin1-> racadm racreset RAC reset operation initated successfully.  It m ...

  10. SSH技术介绍和Xshell公钥远程登陆

    SSH简介 传统的网络服务程序,比如FTP,POP,Telnet,本质上都是不安全的,因为它们在网络上用明文传送数据.用户账号和用户口令,很容易受到中间人攻击方式的攻击,攻击者会冒充真正的服务器接收用 ...