カスタム検索
このエントリーをはてなブックマークに追加

tomo.gif (1144 ツバツイツト)line.gif (927 ツバツイツト)line.gif (927 ツバツイツト)To previous pageTo home pageMailing to me

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

(Redhat Linux)

Modified: 10 March 2001

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

samba-0.2.5 以降で、DoS攻撃、バッファオーバーフロー、setiudしてインストールしたときの3つの問題が解決されています。


smb.conf を変更する
パスワードファイル( smbpasswd )の作成

SWAT(Web管理ツール)が使えるように設定する


 SWAT(Web管理ツール)が使えるように設定する 

サーバー側の設定

"/etc/inetd.conf"を変更する

      :
      :
      :
#
# Authentication
#
# identd is run standalone now
#
#auth stream tcp wait root /usr/sbin/in.identd in.identd -e -o
#
# End of inetd.conf

#linuxconf stream tcp wait root /bin/linuxconf linuxconf --http
swat stream tcp nowait.400 root /usr/sbin/swat swat

SWAT行を、コメントアウトすればOKです。


"/etc/services"を確認する

ポート901が有効になっていることを確認します。

     :
     :
webster 765/tcp # Network dictionary
webster 765/udp
swat 901/tcp # Samba Web Administration Tool
     :
     :


ブラウザで開く

サーバーアドレスが、"linuxserver"であれば、"http://linuxserver:901"とすれば以下の管理ページが開きます。
もちろん開く前にユーザ名とパスワードの入力が求められます。

以下は、rootでログインしましたので、8個のボタンが表示されます。


動作設定する

"root"でログインする

URLから開くとユーザとパスワードを聞いてきますので、rootとそのパスワードを入力します。
rootでなければ設定の変更ができません。


全体設定(Globals)を設定する

Windowsから参照しやすいので、"workgroup" を設定します。

"encrypt passwords"を、"yes"にします。


共有設定(Shares)を設定する

新規共有として"tomo"を設定し、「新規共有作成」ボタンを押します。

"path"、"guest account"を指定し、"browseable"を"yes"に設定します。


 smb.conf を変更する 

/etc/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/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
# cat  passwd  |  mksmbpasswd.sh  >  smbpasswd


SAMBA用のパスワードの設定

先に作成した、smbpasswd を実行し、パスワードの設定をします。

# smbpasswd  tomo
New SMB password:
********
Retype new SMB password:
*******
Password changed for user tomo
#


起動してみる

起動は、以下のコマンドで行います。Linuxを再起動すれば、つながるようになります。

# /etc/rc.d/init.d/smb restart
Restarting SMB services: Shutting dpwn SMB services: smbd nmbd
Starting SMB services: smbd nmbd
done.
#


再起動する

再起動の設定は、"linuxconf" で行います。

"linuxconf"を起動し、

Control
    Control panel
        Control service activity

以下のように設定変更をします。

  Name Enabled Running
変更前 smb Manual  
変更後 smb Automatic Runnig

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



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