カスタム検索
|
Tweet |
|
|
SAMBA (SMBサーバ)を動かしてみる
Modified: 23 Jun 2001
RedHat Linux7.0 をインストールすれば、ソフトはインストールされていますので、設定ファイルをカスタマイズするだけです。
/etc/samba/smb.conf を変更する
以下は、RedHat Linux の smb.conf の抜粋です。(変更後)
[global] :
:# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = user
# Use password server option only with security = server
; password server = <NT-Server-Name># Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.
; password level = 8
; username level = 8# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd:
:要は、[global] のところの、
security = user
の設定を確認します。RedHatLinux の場合は既に有効になっていますから、確認だけでOKです。
次に、以下の2カ所のセミコロンをとります。
; encrypt passwords = yes
; smb passwd file = /etc/smbpasswd以下のようにします。
encrypt passwords = yes
smb passwd file = /etc/smbpasswd
SAMBAのパスワードファイルを作成する
Linuxにユーザを作成します
Windowsにログオンしたときと同じ、ユーザ・パスワードを、adduser コマンドで、作ります。
ユーザやパスワードが異なると、ユーザやパスワードを毎回いれないといけないとか、いろいろ面倒なことが起こります。すくなくとも、同じ名称のユーザは、Linuxに登録し、特別な理由ない限り、同じパスワードにしましょう。
smbpasswdを作る
/etc に移動し、以下を実行して、パスワードファイルを作成します。
# cd /etc/samba
# cat /etc/passwd | mksmbpasswd.sh > smbpasswd
SAMBA用のパスワードの設定
先に作成した、smbpasswd を実行し、パスワードの設定をします。
# smbpasswd tomo
New SMB password: ********
Retype new SMB password: *******
Password changed for user tomo
#
起動と自動再起動設定
起動は、以下のコマンドで行います。
# /etc/rc.d/init.d/smb start
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
#停止は、以下のコマンドで行います。
# /etc/rc.d/init.d/smb stop 設定変更した場合、以下のコマンドで再起動します。
# /etc/rc.d/init.d/smb restart