|
|
サンバをインストール
|
|
|
ここでは、ファイル共有よりも プリンターサーバーに 注目する。
amba (サンバ) は、マイクロソフト社のWindowsネットワークを実装したフリーウェア。 Linux、Solaris、BSD 、Mac OS Xなどの UNIX 系 OS を用いて、Windows のファイルサーバやプリントサービス、ドメインコントローラを提供する。 |
|
|
|
|
インストール
|
|
ファイルサーバー
|
サンバをインストール
|
| |
|
|
|
|
|
eucJP-msのインストール確認
# iconv -l | grep EUC
% EUC-JP EUCJP EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE CSEUCPKDFMTJAPANESE EUC-JP: Command not found. CN-GB EUC-CN EUCCN GB2312 CSGB2312 EUC-TW EUCTW CSEUCTW EUC-KR EUCKR ISO-IR-149 KOREAN KSC_5601 KS_C_5601-1987 KS_C_5601-1989 CSEUCKR CSKSC56011987 EUC-JISX0213c453# CN-GB EUC-CN EUCCN GB2312 CSGB2312 %
入ってないですね・・
libiconvをeucJP-ms有効で再インストールしましょう。 # portupgrade -f -m WITH_EXTRA_PATCHES=yes libiconv-1.11_1 約5分 # portupgrade -f -M WITH_EXTRA_PATCHES=yes libiconv-1.11_1 約5分 # env WITH_EXTRA_PATCHES=yes portupgrade -f libiconv-1.11_1 約5分
# iconv -l | grep EUC 再確認
% EUC-JP EUCJP EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE CSEUCPKDFMTJAPANESE EUC-JP-MS EUCJP-MS EUCJP-OPEN EUCJP-WIN CN-GB EUC-CN EUCCN GB2312 CSGB2312 EUC-TW EUCTW CSEUCTW EUC-KR EUCKR ISO-IR-149 KOREAN KSC_5601 KS_C_5601-1987 KS_C_5601-1989 CSEUCKR CSKSC56011987 EUC-JISX0213 %
okですね! # ee /usr/local/etc/pkgtools.conf 以下を追加しましょう!
+ MAKE_ARGS = { + 'converters/libiconv' => 'WITH_EXTRA_PATCHES=yes', + }
samba 3 インストール
# cd /usr/ports/japanese/samba3/ 約1時間強 # make install clean
(gui画面は デフォルトのまま進めましょう。)
# pkg_add -r samba3 Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.0-release/Latest/samba3.tbz... Done. Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.0-release/All/libexecinfo-1.1_1.tbz... Done.
=============================================================================== NOTICE: This version of port has changed location of Samba password NOTICE: (smbpasswd) directory. Files in '/usr/local/private' NOTICE: have moved to '/usr/local/etc/samba'. =============================================================================== Samba3 *package* now doesn't include ADS support due the portability problems with Kerberos5 libraries on different installations. You need to compile port yourself to get this functionality.
For additional hints and directions, please, look into the README.FreeBSD file. ===============================================================================
# cd /usr/local/etc/ # cp smb.conf.default smb.conf (設定ファイルをコピーしました)
# ee smb.conf
簡単な smb.confの編集例です。
+ の行を編集
[global]
+ workgroup = WORKGROUP + server string = Samba Server + security = user + hosts allow = 192.168.1. 192.168.2. 127. + log file = /var/log/samba/log.%m + max log size = 50 + soket options = TCP_NODELAY + dns proxy = no + display charset = EUCJP-MS + unix charset = EUCJP-MS + dos charset = cp932
[homes] + comment = Home Directories + browseable = no + writable = yes
[share] + comment = share file space + path = /home/share + public = yes + writable = yes + printable = no + write list = @staff
ディレクトリーの設定 # drwxrwxr-x 2 root staff 512 6 2 08:55 /home/share
# ee /etc/rc.conf 以下を追加
+ samba_enable="YES"
SWATによる管理
# ee /etc/rc.conf 以下を追加 inetd_enable="YES" もう設定すみかも?
# ee /etc/inetd.conf 以下を有効に + swat stream tcp nowait/400 root /usr/local/sbin/swat swat
# ee /etc/services 以下を有効に
+ swat 901/tcp # samba web configuration tool
使用環境により # ee /etc/hosts.allow を編集
ALL : localhost 127.0.0.1 : allow ALL : 192.168.0.0/255.255.255.0 : allow ALL : 192.168.11.0/255.255.255.0 : allow ALL : ALL : deny ※ 上記は 誰でもいいよ 設定ですので お勧めはしません!
inetdにHUPシグナルを送ります。これで設定完了。 # kill -HUP PID
もしくは webmin ネットワーク Internet Services and Protocols の 変更を適用にて再起動
さあ http://localhost:901 みえましたか?
=========ネットワークへの接続 の 設定===============
testというユーザーを作成 (FreeBSD システム)
*********************************************************** # adduser test Username: test Full name: test test Uid (Leave empty for default): Login group [test]: staff Login group is staff. Invite test into other groups? []: Login class [default]: Shell (sh csh tcsh nologin) [sh]: sh Home directory [/home/test]: Use password-based authentication? [yes]: no Lock out the account after creation? [no]: Username : test Password : Full Name : test test Uid : 1003 Class : Groups : staff Home : /home/test Shell : /bin/sh Locked : no OK? (yes/no): yes adduser: INFO: Successfully added (test) to the user database. Add another user? (yes/no): no Goodbye!
**************************************************************
サンバに同じユーザー登録
# smbpasswd -a test New SMB password: Retype new SMB password: Added user test. localhost# New SMB password: New: Command not found. Retype new SMB password: Added user test.
**************************************************************
Windows ネットワークより testユーザーで ログオン
|
|
|