redhat5.1的samba的配置及安装
2014-04-08 18:33
351 查看
一,安装samba,首先要保证自己的linux和windows相互能ping通
Linux下查看ip地址命令:ifconfig
修改ip地址命令:ifconfig eth0 192.168.xx.xx
windows下查看ip地址命令:ipconfig
相互能ping通的前提是两者IP地址得在同一网段
二、查看是否安装samba,命令为:rpm -qa | grep samba
如果系统提示找不到命令:则运行命令su - 试试
出现如下包表示已经安装,否则没有安装
samba-winbind-clients-3.5.10-125.el6.i686
samba-client-3.5.10-125.el6.i686
samba-common-3.5.10-125.el6.i686
samba-3.5.10-125.el6.i686
rpm -e samba-common-3.0.33-3.7.el5 -f --nodeps
二、安装samba服务器,找到这三个软件包 ,把他放到一个你自己创建的目录里,然后到这目录去安装
samba-3.5.10-125.el6.i686.rpm
samba-common-3.5.10-125.el6.i686.rpm
samba-client-3.5.10-125.el6.i686.rpm
1、先装samba-common-3.5.10-125.el6.i686.rpm 注意顺序了
命令为:rpm -ivh samba-common-3.5.10-125.el6.i686.rpm
2、然后依次安装另外两个,显示信息如下:
三、接下来就是配置samba,这个比较简单不再赘述
配置Samba
/etc/samba/smb.conf
[root]
comment = Root Directories
browseable = yes
writable = yes
path = /
valid user = pm
添加一个用户名
useradd smb // 添加smb系统用户
smbpasswd -a pm // 修改密码
重启samba
/etc/init.d/smb restart
注意:
1、记得重启网络 : /etc/init.d/network restart,还有重启系统,才能生效
2、启动samba : service smb start
3、在ping的通的前提下做这些事情!
四、
在linux的Samba服务中,不能创建文件夹和文本文件_解决办法
关闭SElinux可以解决: 关闭 SElinux方法:
使用文本编辑工具打开 /etc/selinux/config: vi /etc/selinux/config 找到这段: 找到这段:
# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing. # disabled - SELinux is fully disabled. SELINUX=enforcing
把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:SELINUX=disabled 保存,关闭。 重启系统。
# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing. # disabled - SELinux is fully disabled. #SELINUX=enforcing SELINUX=disabled
最后还是发现在windows下输入账号密码之后登不进去
解决:把配置文件里的user改成share
或者解决方法:security = user 后面加
map to guest=Bad User
另外
Samba如何设置登录时不输入账号和密码 1.在[global]中添加 guest account = nobody 2.在共享中设置 guest ok = yes 或者 public = yes 或者 only guest = yes 3.重启smb服务 service smb restart
就可以登进去了
或者
最后发现自己的samba用户文件夹下可以正常使用,其他的不能进行创建文件夹等的访问
Linux下查看ip地址命令:ifconfig
修改ip地址命令:ifconfig eth0 192.168.xx.xx
windows下查看ip地址命令:ipconfig
相互能ping通的前提是两者IP地址得在同一网段
二、查看是否安装samba,命令为:rpm -qa | grep samba
如果系统提示找不到命令:则运行命令su - 试试
出现如下包表示已经安装,否则没有安装
samba-winbind-clients-3.5.10-125.el6.i686
samba-client-3.5.10-125.el6.i686
samba-common-3.5.10-125.el6.i686
samba-3.5.10-125.el6.i686
samba-winbind-clients-3.5.10-125.el6.i686 samba-client-3.5.10-125.el6.i686 samba-common-3.5.10-125.el6.i686 samba-3.5.10-125.el6.i686
也可用一下命令来卸载:
rpm -e samba-common-3.0.33-3.7.el5 -f --nodeps
二、安装samba服务器,找到这三个软件包 ,把他放到一个你自己创建的目录里,然后到这目录去安装
samba-3.5.10-125.el6.i686.rpm
samba-common-3.5.10-125.el6.i686.rpm
samba-client-3.5.10-125.el6.i686.rpm
samba-3.5.10-125.el6.i686.rpm samba-common-3.5.10-125.el6.i686.rpm samba-client-3.5.10-125.el6.i686.rpm
1、先装samba-common-3.5.10-125.el6.i686.rpm 注意顺序了
命令为:rpm -ivh samba-common-3.5.10-125.el6.i686.rpm
2、然后依次安装另外两个,显示信息如下:
三、接下来就是配置samba,这个比较简单不再赘述
配置Samba
/etc/samba/smb.conf
[root]
comment = Root Directories
browseable = yes
writable = yes
path = /
valid user = pm
添加一个用户名
useradd smb // 添加smb系统用户
smbpasswd -a pm // 修改密码
重启samba
/etc/init.d/smb restart
注意:
1、记得重启网络 : /etc/init.d/network restart,还有重启系统,才能生效
2、启动samba : service smb start
3、在ping的通的前提下做这些事情!
四、
在linux的Samba服务中,不能创建文件夹和文本文件_解决办法
关闭SElinux可以解决: 关闭 SElinux方法:
使用文本编辑工具打开 /etc/selinux/config: vi /etc/selinux/config 找到这段: 找到这段:
# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing. # disabled - SELinux is fully disabled. SELINUX=enforcing
把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:SELINUX=disabled 保存,关闭。 重启系统。
# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing. # disabled - SELinux is fully disabled. #SELINUX=enforcing SELINUX=disabled
最后还是发现在windows下输入账号密码之后登不进去
解决:把配置文件里的user改成share
或者解决方法:security = user 后面加
map to guest=Bad User
另外
Samba如何设置登录时不输入账号和密码 1.在[global]中添加 guest account = nobody 2.在共享中设置 guest ok = yes 或者 public = yes 或者 only guest = yes 3.重启smb服务 service smb restart
就可以登进去了
或者
最后发现自己的samba用户文件夹下可以正常使用,其他的不能进行创建文件夹等的访问
相关文章推荐
- RedHat enterprise6.3 samba服务安装和配置
- redhat 安装配置samba实现win共享linux主机目录
- redhat as4.6 安装 samba 及配置
- redhat安装配置samba实现win共享linux主机目录
- redhat 5.8 samba配置安装测试
- redhat enterprixe 5.0 samba 服务器 rpm 安装及配置
- RedHat6.3 samba服务安装和配置
- RedHat enterprise6 samba服务安装和配置
- redhat5.1上安装oracle 10.2g客户端及配置使用
- 实战 redhat as4.5 安装 samba 及配置
- redhat samba安装配置
- Centos5.2下安装配置samba文件服务器
- centos安装配置samba服务
- RedHat_Linux_9.0_Samba配置详解
- samba安装及创建配置脚本
- 【Ubuntu】[服务配置单]:ubuntu安装好之后,不能使用setup命令(redhat是这个),显示服务配置表单,而是使用是sysv-rc-conf这个命令。
- samba安装及配置
- VMware Site Recovery Manager 5.1安装配置-Part1-基础环境
- Redhat、centos安装配置postgresql
- Redhat安装hba卡,配置emc powerpath,配置LVM