[samba-jp:20114] Re: smbstatusでのmachineの表示がIPアドレスになるする理由は?

YAMASAKI Hiroyuki yamasaki.hiroyuki @ sp.qnes.nec.co.jp
2008年 3月 26日 (水) 16:51:58 JST


山崎と申します。

補足です。

>445ポート(DirectHost)で接続されている場合にそうなります。

445ポートで接続していても、クライアントのNetBIOS名が表示されるときがあります。

ユーザ認証時に、NTLMSSPを使って認証したときはクライアントのNetBIOS名が通知される
ので、そのNetBIOS名を使います。

ソースで言うと、以下のあたりです。

auth/auth_ntlmssp.c
-------------------------------------------------------------------
/**
 * Check the password on an NTLMSSP login.
 *
 * Return the session keys used on the connection.
 */

static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state, DATA_BLOB *user_session_key, DATA_BLOB *lm_session_key)
{
	(略)

        /* the client has given us its machine name (which we otherwise would not get on port 445).
           we need to possibly reload smb.conf if smb.conf includes depend on the machine name */

        set_remote_machine_name(auth_ntlmssp_state->ntlmssp_state->workstation, True);

	(略)
-------------------------------------------------------------------

よって、IPアドレスしか表示されないときは、
 - 445ポートで接続し、
かつ
 - 認証方式がNTLMSSPじゃない
ときだと推測します。



samba-jp メーリングリストの案内