[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[plamo:05262] Re: dhcpcd vs Samba



From: "Tadashi Nakamura" <tn_mls@hotmail.com>
Subject: [plamo:05260] Re: dhcpcd vs Samba
Date: Tue, 7 Mar 2000 10:20:49 +0900
Message-ID: <20000307012015.97011.qmail@hotmail.com>

早間です。

tn_mls> 早間さん、ありがとうがざいます。
tn_mls> 残念ながら、解決には遠く及ばない状況です。
tn_mls> 早間さんのご指摘しただいた
tn_mls> >Server Process の実行開始が IP 取得以前に
tn_mls> >実行されてしまうのが問題
tn_mls> というよりも前の段階でトラぶっていることがわかりました。
tn_mls> 
tn_mls> > tn_mls> #ifconfig eth0 では、
tn_mls> > tn_mls>   inet addr:192.168.0.3
tn_mls> > tn_mls> となるのですが
tn_mls> > tn_mls> #./nmblookup -B localhost __SAMBA__ では
tn_mls> > tn_mls>     127.0.0.1 __SAMBA__<00>
tn_mls> 
tn_mls> この部分は、/etc/hosts に、
tn_mls> 127.0.0.1   mypc.mydomain  mypc
tn_mls> の記述が残存していたという単純なミスでしたが、が、が、
tn_mls> /etc/hosts から、その行を削除したら、
tn_mls> Samba が全く機能しなくなりました。
tn_mls> 
tn_mls> ということは、ウチの Samba は、もっぱら
tn_mls> /etc/hosts を参照して IP Address を
tn_mls> 取得していた、ということになりますよね。
tn_mls> せっかく dhcpcd の提供する $IPADDRESS などは
tn_mls> 見向きもせずに、、、

この責任は samba にはありません。$IPADDRESS が提供されない状況で
samba が起動されているのです。

tn_mls> 
tn_mls> ウチの Samba がちょっとおかしいのか
tn_mls> Samba はもともとそうなのか?

折角ですが、コンピュータの作動がうまく行かないのは利用者の責任です。
(
     本当に頭の痛いことですよね。
    「コンピュータを怒鳴り飛ばして、始末書を書かせる」
     のが私の夢の一つです
)

tn_mls> それとも、/usr/local/etc あたりに
tn_mls> lmhosts を用意すればいいのか?
tn_mls> 静的 IP Address で、Network を運用していた頃には
tn_mls> 考えもしなかったいろんな問題が次々と、、、
tn_mls> 

samba の設定ファイルによって 
(1)/etc/HOSTNAME
(2)/etc/hosts
も無関係では無いでしょうか。VmWare では表の(外部に公開する?)IP ア
ドレスとは無関係に Host のos (私の場合は Linux)とGuest
os(WIndows/98)の間でプライベート(本当にプライベートです、何しろ機
械の外に出さないのですから)なアドレスを使用してsamba を実行してい
ます。

例ですが
/etc/HOSTNAME の内容 mmm.xxx.co.jp
Linux の IP 192.168.0.30  (外部DNS による)
Windows/98 の IP  192.168.0.31  (外部DNS による)
とは別に
Linux の IP 192.168.16.1    (内部VMware で設定)
Windows/98 の IP  192.168.16.129    (内部VMware のDHCP)
が割り当てられています。
samba の設定ファイルは最初下記のものが作成されます。

ここで判るように下記の5設定を設定すればネットワークの設定から独立出来ます。
   socket address = 192.168.16.1   <-- /etc/hosts 無関係です。
   interfaces = 192.168.16.0/255.255.255.0
   bind interfaces only = yes
   workgroup = WORKGROUP
   netbios name = Linux  <-- これを設定すれば/etc/HOSTNAMEを参照しません

このguest os のwindows/98 は 192.168.16.129 を使用してHost os の 
Linux を参照し、192.168.0.31 を使用して外部のサーバにアクセスして
います。

[global]
;
; Identity
;

; Allow several Samba servers on different subnet without conflicts
   socket address = 192.168.16.1
   interfaces = 192.168.16.0/255.255.255.0
   bind interfaces only = yes

; Workgroup the host belongs to
  workgroup = WORKGROUP

; SMB name of the host (the hostname by default)
;  netbios name = 

; Description of the host
  server string = VMware host

;
; Access
;

;  Allow connections from
;   Beware: if we use this directive, smbd will try to do a reverse resolution
;   of the guest IP. If the host is disconnected from the network and uses
;   named, that reverse resolution will take a long time, and the smb client
;   (the guest) will give up waiting for a smb reply before the reverse
;   resolution timeout occurs :(
;   Because it doesn't add any real security, we don't use this --hpreg
;  hosts allow = 192.168.16.0/255.255.255.0

;  Authentication scheme
  security = user
  encrypt passwords = yes

;
; Options
;

; Automatically load the printer list (from /etc/printcap by default)
  load printers = yes

; Gives better performance
  socket options = TCP_NODELAY 

; VMware extension to use a different shared memory access key on each
; Samba server running on this host
  sysv shm key = /dev/vmnet1

;
; Files and directories
;

;  Debug log for _both_ daemons
;  log file = /etc/vmware/vmnet1/smb/var/log.smb
;  log level = 1
;   Max log size in KB 
;  max log size = 50

;  Locks
  lock directory = /etc/vmware/vmnet1/smb/var/locks

;  SMB passwords
  smb passwd file = /etc/vmware/vmnet1/smb/private/smbpasswd

;  VMware extension to use codepages in a different directory
  codepage dir = /usr/lib/vmware/smb/codepages

;
; Name browsing
;

; Allow the host to participate in master browser elections
  local master = yes

; Force a local browser election upon startup
; We need that otherwise it takes a long time before the windows network is
; browsable
  preferred master = yes

; Do not try to resolve SMB names via DNS
  dns proxy = no 

;
; Shared resources
;

; Home directories
[homes]
  comment = Home directories
  browseable = no
  writable = yes

; Printers
[printers]
  comment = All printers
  path = /var/lpd
  browseable = no
  guest ok = no
  writable = no
  printable = yes

[HostFS]
  comment = VMware host filesystem
  path = /
  public = no
  writeable = yes
  printable = no

tn_mls> Plamo 2.* では、dhcp Client の扱いはどうなっているのでしょうか?
tn_mls> 

dhcpcd-0.70.tar.gzのコンパイルに失敗しました。
dhcp-3.0b1pl12.tar.gz を使用しています。
/etc/dhclient.conf
/etc/dhclient-script
でdhcpcd-0.70.tar.gz と変わり無い機能が使用できます。

tn_mls> なお Samba は、Plamo 1.4.4 の CDROM の中の samba2.tgz を使いました。
tn_mls> 

dhcpcd-0.70.tar.gz とともに愛用しておりました。

Follow-Ups
[plamo:05263] Re: dhcpcd vs Samba, 早間義博
[plamo:05264] Re: dhcpcd vs Samba, ISHIDA Kazunori
References
[plamo:05258] dhcpcd vs Samba, Tadashi Nakamura
[plamo:05259] Re: dhcpcd vs Samba, 早間義博
[plamo:05260] Re: dhcpcd vs Samba, Tadashi Nakamura

[検索ページ] [メール一覧]
Plamo ML 公開システム