搭建samba服务器
# cd /usr/ports/net/samba46 && make install
出现选择,依照内定预设值,按TAB选择OK,再按Enter.
Options for samba 3.0.24,1
[X] LDAP With LDAP support
[X] ADS With Active Directory support
[X] CUPS With CUPS printing support
[X] WINBIND With WinBIND support
[X] ACL_SUPPORT With ACL support
[ ] FAM_SUPPORT With File Alteration Monitor
[X] SYSLOG With Syslog support
[ ] QUOTAS With Disk quota support
[X] UTMP With UTMP accounting support
[ ] MSDFS With MSDFS support
[ ] PAM_SMBPASS With PAM authentication vs passdb backends
[ ] CLUSTER With experimental cluster support
[ ] EXP_MODULES With experimental modules
[X] POPT With system-wide POPT library
[ ] MAX_DEBUG With maximum debuging
# cp /usr/local/etc/smb.conf.default /usr/local/etc/samba.conf \\复制Samba.conf配置文件
########################以下内容可实现用户自动登录home目录##########################
workgroup = WORKGROUP
server string = %h Samba Server
log file = /var/log/samba/%m.log
[homes]
comment = Home directory for %u on %h
browseable = no
writable = yes
path = /usr/home/%u/
valid users = %S
##################################################################
编辑/etc/rc.conf添加
winbindd_enable="YES"
samba_enable="YES"
然后添加使用者账号
# adduser username
设定samba user database (samba的使用者账号):
# smbpasswd -a username
/usr/local/etc/rc.d/samba start //启动samba服务
全国职称计算机考试速成过关系列套装:W .. 定价:¥133 优惠价:¥133.0 更多书籍 | |
全国职称计算机考试速成过关系列套装:W .. 定价:¥124 优惠价:¥124.0 更多书籍 |