歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> Unix基礎知識 >> freebsd用法配置匯總(4)

freebsd用法配置匯總(4)

日期:2017/2/25 10:11:24   编辑:Unix基礎知識

搭建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服務

Copyright © Linux教程網 All Rights Reserved