记录一下samba服务器的安装
需要的软件包
samba-3.0.28-0.el5.8.i386.rpm samba-common-3.0.28-0.el5.8.i386.rpm samba-client-3.0.28-0.el5.8.i386.rpm samba-swat-3.0.28-0.el5.8.i386.rpm
下面进行安装软件包
rpm -ivh samba-common-3.0.28-0.el5.8.i386.rpm
rpm -ivh samba-client-3.0.28-0.el5.8.i386.rpm
rpm -ivh samba-3.0.28-0.el5.8.i386.rpm
rpm -ivh samba-swat-3.0.28-0.el5.8.i386.rpm
在安装软件包是如果出现 file /usr/sbin/winbindd from install of samba-common-3.0.28-0.el5.8 conflicts with file from package samba-common-3.0.25b-0.el5.4
这是提示安装的el5.8和el5.4冲突。使用rpm -Uvh --force --nodeps命令安装
安装完成启动服务 /etc/rc.d/init.d/smb start
这时查看smb的服务端口:netstat -anp|grep nmbd (客户端口)
netstat -anp|grep smbd (服务端口)
samba的用户是系统的用户共存的,添加用户
useradd xx
passwd xx 进行密码设置
smbpasswd xx 进行设置samba服务的密码
这时可以进行测试,如在windos中运行\\ip地址进行登陆共享
samba的配置文件在 /etc/samba/目录里 sam.conf
有一种简单配件文件自行修改:
[global]
server string = Samba Server security = user encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd [knose] workgroup = root netbios name = root path = /data0/knose browseable = yes writeable = yes [web] workgroup = www netbios name = www path = /data0/htdocs browseable = yes writeable = yes