1、安装samba,smbfs

samba 服务器的搭建,samba服务器搭建

一,安装samba4

不要直接 yum install samba
,默认安装的是samba3版本,但这个版本有问题(open_rpc_pipe_p: copy_serverinfo failed这个错误)
  所以这里安装samba4 版本 //查看源
[[email protected] samba]# yum list samba*.*
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile
 * base: mirrors.163.com  * extras: centos.ustc.edu.cn
 * updates: mirrors.163.com Installed Packages
samba4.x86_64                                                                                                              4.0.0-66.el6_6.rc4                                                                                         @base  
samba4-client.x86_64                                                                                                       4.0.0-66.el6_6.rc4                                                                                         @base  
samba4-common.x86_64                                                                                                       4.0.0-66.el6_6.rc4                                                                                         @base  
samba4-libs.x86_64                                                                                                         4.0.0-66.el6_6.rc4                                                                                         @base  
samba4-winbind.x86_64                                                                                                      4.0.0-66.el6_6.rc4                                                                                         @base  
samba4-winbind-clients.x86_64                                                                                              4.0.0-66.el6_6.rc4                                                                                         @base  
Available Packages
samba.x86_64                                                                                                               3.6.23-21.el6_7                                                                                            updates
samba-client.x86_64                                                                                                        3.6.23-21.el6_7                                                                                            updates
samba-common.i686                                                                                                          3.6.23-21.el6_7                                                                                            updates
samba-common.x86_64                                                                                                        3.6.23-21.el6_7                                                                                            updates
samba-doc.x86_美高梅电子游戏,64                                                                                                           3.6.23-21.el6_7                                                                                            updates
samba-domainjoin-gui.x86_64                                                                                                3.6.23-21.el6_7                                                                                            updates
samba-glusterfs.x86_64                                                                                                     3.6.23-21.el6_7                                                                                            updates
samba-swat.x86_64                                                                                                          3.6.23-21.el6_7                                                                                            updates
samba-winbind.x86_64                                                                                                       3.6.23-21.el6_7                                                                                            updates
samba-winbind-clients.i686                                                                                                 3.6.23-21.el6_7                                                                                            updates
samba-winbind-clients.x86_64                                                                                               3.6.23-21.el6_7                                                                                            updates
samba-winbind-devel.i686                                                                                                   3.6.23-21.el6_7                                                                                            updates
samba-winbind-devel.x86_64                                                                                                 3.6.23-21.el6_7                                                                                            updates
samba-winbind-krb5-locator.x86_64                                                                                          3.6.23-21.el6_7                                                                                            updates
samba4-dc.x86_64                                                                                                           4.0.0-66.el6_6.rc4                                                                                         base   
samba4-dc-libs.x86_64                                                                                                      4.0.0-66.el6_6.rc4                                                                                         base   
samba4-devel.x86_64                                                                                                        4.0.0-66.el6_6.rc4                                                                                         base   
samba4-pidl.x86_64                                                                                                         4.0.0-66.el6_6.rc4                                                                                         base   
samba4-python.x86_64                                                                                                       4.0.0-66.el6_6.rc4                                                                                         base   
samba4-swat.x86_64                                                                                                         4.0.0-66.el6_6.rc4                                                                                         base   
samba4-test.x86_64                                                                                                         4.0.0-66.el6_6.rc4                                                                                         base   
samba4-winbind-krb5-locator.x86_64                                                                                         4.0.0-66.el6_6.rc4
                      
[[email protected] samba]#
yum install -y samba4  
[[email protected] samba]# yum install -y samba4-winbind.x86_64 samba4-client.x86_64 samba4-winbind-clients.x86_64 
 
[[email protected] samba]# rpm -qa|grep samba
samba4-winbind-clients-4.0.0-66.el6_6.rc4.x86_64
samba4-client-4.0.0-66.el6_6.rc4.x86_64
samba4-libs-4.0.0-66.el6_6.rc4.x86_64
samba4-4.0.0-66.el6_6.rc4.x86_64
samba4-winbind-4.0.0-66.el6_6.rc4.x86_64
samba4-common-4.0.0-66.el6_6.rc4.x86_64     二,设置防火墙  
-A INPUT -m state –state NEW -m tcp -p tcp –dport 137 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 138 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 139 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 445 -j ACCEPT
三,授权共享权限    useradd operate   smbpasswd -a  operate
//添加smb登录用户并设置密码(注意系统中必须存在相同的用户名)  
smbpasswd -x  operate //删除  
[[email protected] samba]# cat smb.conf
[global] server string = Samba Server dos charset = GB2312
unix charset = GB2312 display charset = GB2312 security = share
encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd  
[share] public = yes path = /home/samba/share  
//无密码即可访问可以设置 chown nobody.nobody /home/samba/share 和 chmod
777 /home/samba/share   [operate] workgroup = operate
netbios name= operate path = /home/samba/operate
 //chown operate.operate /home/samba/share 和 chmod
777 /home/samba/operate browseable = yes writeable = yes    
四,重启服务 service smb restart   windows 中 运行cmd 中//IP
访问,输入上面设置密码即可。            

服务器的搭建,samba服务器搭建
一,安装samba4 不要直接 yum install samba
,默认安装的是samba3版本,但这个版本有问题(open_rpc_pipe_p:copy_…

美高梅电子游戏 1

2、配置smb.conf文件

配置文件之前需要先备份一下需要配置的文件(养成好的习惯)

美高梅电子游戏 2

输入命令:

美高梅电子游戏 3

进入到smb.conf文件中,在文件的最后添加下列语句

Author

发表评论

电子邮件地址不会被公开。 必填项已用*标注

相关文章