首页 > 代码库 > 源码安装Samba4.6.4
源码安装Samba4.6.4
系统:
CentOS release 6.5
安装包:
samba-4.6.4.tar.gz
安装
$ yum install gcc gcc++ gnutls-devel python python-devel python-lib* libacl-devel openldap-devel -y $ tar xf samba-4.6.4.tar.gz $ cd samba-4.6.4 $ ./configure --prefix=/soft/samba $ make && make install
添加动态链接库
$ echo "/soft/samba/lib" >> /etc/ld.so.conf $ ldconfig #加载动态链接库
复制、过滤配置文件,可以省略自己生成
$ cp /root/samba-4.6.4/packaging/LSB/smb.conf /soft/samba/etc/ $ cd !$ $ cp smb.conf smb.conf.bak $ grep -Ev "#|^$|;" smb.conf.bak > smb.conf
配置信息
$ vim smb.conf [global] workgroup = MYGROUP server string = Samba Server Version %v security = user passdb backend = tdbsam load printers = yes cups options = raw map to guest = bad user max connections = 0 log file = /var/log/samba/log.%m max log size = 1024 [data] comment=Temporary file space path=/data read only=no valid users = mzdata write list = mzdata printable = no create mask = 0755 directory mask = 0755 #public=yes
创建用户,注:这里需要系统上已存在的用户,不然会报错
$ useradd mzdata
$ /soft/samba/bin/pdbedit -a -u mzdata new password: #输入密码 retype new password: #再次输入 Unix username: mzdata NT username: Account Flags: [U ] User SID: S-1-5-21-2155642128-2869549891-154057661-1000 Primary Group SID: S-1-5-21-2155642128-2869549891-154057661-513 Full Name: Home Directory: \\nnn-10\mzdata HomeDir Drive: Logon Script: Profile Path: \\nnn-10\mzdata\profile Domain: NNN-10 Account desc: Workstations: Munged dial: Logon time: 0 Logoff time: Wed, 06 Feb 2036 23:06:39 CST Kickoff time: Wed, 06 Feb 2036 23:06:39 CST Password last set: Fri, 26 May 2017 20:43:59 CST Password can change: Fri, 26 May 2017 20:43:59 CST Password must change: never Last bad password : 0 Bad password count : 0 Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
查看用户是否创建成功
$ /soft/samba/bin/pdbedit -L mzdata:500:
$ /soft/samba/sbin/smbd #启动samba服务器
源码安装Samba4.6.4
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。