カスタム検索
このエントリーをはてなブックマークに追加
tomo.gif (1144 ツバツイツト)line.gif (927 ツバツイツト)line.gif (927 ツバツイツト)To previous pageTo home pageMailing to me

SAMBA (SMBサーバ)を動かしてみる

Modified: 23 Jun 2001

RedHat Linux7.0 をインストールすれば、ソフトはインストールされていますので、設定ファイルをカスタマイズするだけです。


smb.conf を変更する
パスワードファイル( smbpasswd )の作成
起動、停止と再起動の方法


 smb.conf を変更する 

/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


 パスワードファイル( smbpasswd )の作成 

SAMBAのパスワードファイルを作成する

Linuxにユーザを作成します

Windowsにログオンしたときと同じ、ユーザ・パスワードを、adduser コマンドで、作ります。

atten.gif (960 ツバツイツト) ユーザやパスワードが異なると、ユーザやパスワードを毎回いれないといけないとか、いろいろ面倒なことが起こります。すくなくとも、同じ名称のユーザは、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

To previous pageTo home pageMailing to meJump to Top of pageline.gif (927 ツバツイツト)tomo.gif (1144 ツバツイツト)
カスタム検索



このエントリーをはてなブックマークに追加