Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1730729
  • 博文数量: 234
  • 博客积分: 4966
  • 博客等级: 上校
  • 技术积分: 3322
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-13 01:03
文章分类

全部博文(234)

文章存档

2017年(2)

2016年(1)

2015年(8)

2014年(11)

2013年(44)

2012年(27)

2011年(22)

2010年(30)

2009年(37)

2008年(6)

2007年(45)

2006年(1)

分类: LINUX

2007-08-30 11:27:59

Samba 软件包介绍

samba    samba服务器软件包
samba-client    samba客户端工具
sambb-common     通用工具和库

 安装Samba软件包

1    首先需要安装  rpmdb-fedora 软件包。(-ivh)(1 verify 2 install 3print hash marks)
    #rpm -ivh rpmdb-fedora*.rpm
     作用为使得一些相互依赖的关系能被处理。
2     安装samba软件包(一般在第一张光盘)(--aid)(add suggested package to transaction)
    #rpm -ivh --aid samba*.rpm
3    检查软件包的内容    (-ql)(query list)
    # rpm -ql samba
    # rpm -ql samba-common
    # rpm -ql samba-client

Samba软件的使用
    smbtree 显示局域网的目录树
      smbtree [-b][-D][-U]     (-b是广播broadcast)(-D只显示工作组名domain)
                                    (—U指定用户,一般不用)
    nmblookup 显示一台主机的ip
    nmblookup 915-2 或  nmblookup \* (\*是转译*号,显示所有ip)
smbclient 显示/登录主机
    smbclient -L 915-2 或    (-L list)
    smbclient -L 192.168.0.55
    smbclient -L 192.168.0.55 -U administrator%915
    
     smbclient //192.168.0.55/putty -U administrator%915(登录远程主机目录)
    登录后  get 下载文件
    put /root/install.log install.log (传送本地机器文件到 目标机上并重新命名)
mount远程目录    
    mount -t cifs //192.168.0.55/putty /mnt/cdrom -o username=administrator%915

smbtar 远程备份网上邻居中的文件(需要稍作修改)
用法: smbtar -s server -u user -p password -x sharename -t output
smbtar -s 192.168.0.55 -u administrator -p 915 -x putty -t putty.tar
注意 : fedora5 以前的版本 smbtar的脚本要作修改.
                   which smbtar  结果  /usr/bin/smbtar
                         vi /usr/bin/smbtar 去掉 -N选项

Samba服务器配置
1、修改配置文件 /etc/samba/smb.conf
               
workgroup = workgroup               
security =     share
[docs]
        path = /usr/share/doc
        commnet = share documents
        public = yes
2、重新启动smb 服务器
#service smb restart
#chkconfig smb on
3、测试
#smbclient -L localhost -N
阅读(2092) | 评论(0) | 转发(0) |
0

上一篇:ubuntu更新源

下一篇:网卡的组成工作原理

给主人留下些什么吧!~~