宜蘭縣教育支援平台 會員登入 會員註冊 我的i教書

在使用 testparm 測試 Samba Server 設定檔時會出現如下的提示訊息
# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

 (閱讀全文)

1. 安裝 Samba Server
# yum install samba

2. 修改設定檔 /etc/samba/smb.conf
# cat /etc/samba/smb.conf | grep -E -v '^#|^;'
[global]
        workgroup = HOME
        server string = Samba Server Version %v

        # log files split per-machine:
        log file = /var/log/samba/log.%m
        # maximum size of 50KB per log file, then rotate:
        max log size = 50

        security = user
        passdb backend = tdbsam

[homes]
        comment = Home Directories
        browseable = no
        writable = yes
        valid users = %S
        veto files=/.*

 (閱讀全文)

1. 搜尋 Samba 套件
# yum search samba | grep ^samba
samba-client.x86_64 : Samba client programs
samba-common.i686 : Files used by both Samba servers and clients
samba-common.x86_64 : Files used by both Samba servers and clients
samba-doc.x86_64 : Documentation for the Samba suite
samba-glusterfs.x86_64 : Samba VFS module for GlusterFS
samba-swat.x86_64 : The Samba SMB server Web configuration program
samba-winbind.x86_64 : Samba winbind
samba-winbind-clients.i686 : Samba winbind clients
samba-winbind-clients.x86_64 : Samba winbind clients
samba-winbind-krb5-locator.x86_64 : Samba winbind krb5 locator
samba4-client.x86_64 : Samba client programs
samba4-common.x86_64 : Files used by both Samba servers and clients
samba4-devel.x86_64 : Developer tools for Samba libraries
samba4-libs.x86_64 : Samba libraries
samba4-python.x86_64 : Samba Python libraries
samba4-test.x86_64 : Testing tools for Samba servers and clients
samba4-winbind.x86_64 : Samba winbind
samba4-winbind-clients.x86_64 : Samba winbind clients
samba4-winbind-krb5-locator.x86_64 : Samba winbind krb5 locator
samba.x86_64 : Server and Client software to interoperate with Windows machines
samba-domainjoin-gui.x86_64 : Domainjoin GUI
samba-winbind-devel.i686 : Developer tools for the winbind library
samba-winbind-devel.x86_64 : Developer tools for the winbind library
samba4.x86_64 : Server and Client software to interoperate with Windows machines
samba4-dc.x86_64 : AD Domain Controller placeholder package.
samba4-dc-libs.x86_64 : AD Domain Controller libraries placeholder package.
samba4-pidl.x86_64 : Perl IDL compiler

2. 安裝 Samba 4
# yum install -y samba4

 (閱讀全文)

1. 搜尋 Samba Server 套件
# apt-cache search samba | grep ^samba
samba - SMB/CIFS file, print, and login server for Unix
samba-common - common files used by both the Samba server and client
samba-common-bin - Samba common files used by both the server and the client
samba-dbg - Samba debugging symbols
samba-dev - tools for extending Samba
samba-doc - Samba documentation
samba-dsdb-modules - Samba Directory Services Database
samba-libs - Samba core libraries
samba-testsuite - test suite from Samba
samba-vfs-modules - Samba Virtual FileSystem plugins

2. 進行安裝
# apt-get install samba

 (閱讀全文)

參考文章:Samba 4.1 on FreeBSD 10.1 · GitHub
1. 搜尋可用的套件
# pkg search samba | grep ^samba
samba-nsupdate-9.8.6_1         nsupdate utility with GSS-TSIG support
samba-virusfilter-0.1.3_1      On-access anti-virus filter for Samba
samba36-3.6.25_3               Free SMB and CIFS client and server for Unix
samba36-libsmbclient-3.6.25_2  Shared lib from the samba package
samba36-nmblookup-3.6.25       NetBIOS Name lookup tool
samba36-smbclient-3.6.25       Samba "ftp-like" client
samba41-4.1.22_2               Free SMB/CIFS and AD/DC server and client for Unix
samba42-4.2.11                 Free SMB/CIFS and AD/DC server and client for Unix
samba43-4.3.8                  Free SMB/CIFS and AD/DC server and client for Unix

2. 直接安裝最新的版本
# pkg install samba43

************************************************************
Message from trousers-tddl-0.3.10_7:
To run tcsd automatically, add the following line to /etc/rc.conf

tcsd_enable="YES"

You might want to edit /usr/local/etc/tcsd.conf to reflect your setup.

To use TPM, add your_account to '_tss' group like following:

# pw groupadd _tss -m your_account
Message from cyrus-sasl-2.1.26_12:
You can use sasldb2 for authentication, to add users use:

        saslpasswd2 -c username

===============================================================================
Message from samba43-4.3.8:
===============================================================================

How to start: http://wiki.samba.org/index.php/Samba4/HOWTO

* Your configuration is: /usr/local/etc/smb4.conf

* All the relevant databases are under: /var/db/samba4

* All the logs are under: /var/log/samba4

* Provisioning script is: /usr/local/bin/samba-tool

For additional documentation check: http://wiki.samba.org/index.php/Samba4

Bug reports should go to the: https://bugzilla.samba.org/

===============================================================================

 (閱讀全文)

參考網頁:解決 smbd 錯誤訊息 Unable to connect to CUPS server localhost:631 - Connection refused | Mr. 沙先生
在看系統 log 檔時,發現 Samba Server 出現如下的錯誤訊息
Aug 31 12:42:54 localhost smbd[30235]:   Unable to connect to CUPS server localhost:631 - 連線被拒絕
Aug 31 12:42:54  localhost smbd[30226]: [2015/08/31 12:42:54.544213,  0] printing/print_cups.c:528(cups_async_callback)
Aug 31 12:42:54  localhost smbd[30226]:   failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL

可能的原因是,Samba Server 安裝預設會啟用 Printer Server,但這一台 Samba Server 只負責檔案儲存及分享使用,並沒有擔任 Printer Server 的工作,所以要把 Samba Server 設定檔中關於 Printer Server 的設定關閉。

 (閱讀全文)

1. 進行備份學生帳號及密碼
# tar cvjfp /Backup/Stu_account.tar.bz2 /etc/passwd /etc/shadow /etc/group /etc/gshadow
2. 學生檔案備份
# tar cvjfp /Backup/Stu.tar.bz2 /etc/samba/smb.conf /home/s0990 /home/s0100 /var/lib/samba/private
3. 資料還原
# tar xvjfp /Backup/Stu.tar.bz2 -C /

 (閱讀全文)

安裝方式:
$ sudo apt-get install samba tdb-tools

修改設定檔 /etc/samba/smb.conf
$ grep -E -v '^$|^#|^;' /etc/samba/smb.conf

 (閱讀全文)

利用 Samba Server 來當做網路上的芳鄰,可以分享資料。
# apt-get install samba

修改 Samba Server 設定檔
# vim /etc/samba/smb.conf
[global]
workgroup = HOME
security = user
[homes]
   comment = Home Directories
   browseable = no
   read only = no

 (閱讀全文)

安裝 Samba Server
# pacman -S samba

修改設定檔
# cp /etc/samba/smb.conf.default /etc/samba/smb.conf
# egrep -v '^$|^#|^;' /etc/samba/smb.conf
[global]
   workgroup = HOME
   server string = Samba Server
   printcap name = /etc/printcap
   load printers = yes
   log file = /var/log/samba/%m.log
   max log size = 50
   security = user
   dns proxy = no
[homes]
   comment = Home Directories
   browseable = no
   writable = yes
[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
   guest ok = no
   writable = no
   printable = yes

 (閱讀全文)