调试samba

前言

我们工作中经常的会使用samba。
但是出现一个棘手的问题我们应该怎么办呢?网上查资料查解决方案?
还是自己下一套samba的源码分析一番呢?

本文介绍了工作中遇到的一个问题。
然后通过查看源码来分析为什么会出这个错误。
以及最后应该怎么解决这个错误。


参考https://wiki.ubuntu.com/DebuggingSamba这个。
我们先看看这个wiki上介绍的怎么调试samba的吧

Introduction(介绍)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Samba is a complex package, because it covers a wide range of use cases and provides lots of different binary packages.

Bugs relating to the samba source package typically fall into one of the following categories:(一般分为下面几种场景)

1.User cannot connect to (or properly access files on) a remote share from his Ubuntu system. This falls under the category of samba as a client.

2.Other systems cannot connect to (or properly access files on) an Ubuntu system providing samba shares. This may be an issue with samba as a server.

3.Install/upgrade failures of the samba packages.

4.libpam-smbpass specific issues. Sharing a folder from the GUI installs libpam-smbpass, which stacks a PAM module that maintains sync between system and samba passwords. Failure in libpam-smbpass may result in inability to login on the system.

5.winbind specific issues. Winbind allows to get user/group info from a Windows DC. It is sometimes installed by unsuspecting users as a recommended package from Wine.

Also, it is a very good idea to have a look at the official Samba HOWTO. You will find there not only a how-to, but also common errors.

How to file(如何定位哪个)

1
2
3
4
5
6
7
8
9
10
11
First figure out if the bug falls under one of the generic categories:

1.samba as a client

2.samba as a server

3.install/upgrade failure

4.libpam-smbpass related

5.winbind related

Samba as a client(samba作为客户端来使用)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
IS IT A REGRESSION ?
Did this use to work properly with a previous release ?

WHAT VERSION OF SAMBA PACKAGES ARE USED ?
Please give the output of:

dpkg-query -W -f='${Package} ${Version} ${Source} ${Status}\n' | grep samba
HOW IS THE REMOTE SHARE ACCESSED FROM THE UBUNTU SYSTEM?
nautilus (or other GUI client)
smbclient (from the command line)
cifs filesystem mount (from /etc/fstab or a mount command)
IF NAUTILUS (OR ANOTHER GUI CLIENT) IS USED TO ACCESS THE REMOTE SHARE, CAN THE SHARE BE ACCESSED WITH THE SMBCLIENT COMMAND LINE UTILITY ?
To test:

install the samba-client package
try to connect to the remote system from the command line:

smbclient //remote_system/share_name
If the share requires a specific username/password, try using the "-U" parameter (for example, use "-U ntdomain\\user").

IF A CIFS MOUNT IS USED
In that case please also provide:

the content of the file /etc/fstab, or the command line used to mount the remote share if the share is manually mounted.

the content of the file /proc/fs/cifs/DebugData

WHAT IS THE REMOTE SERVER ?
In all cases, please include the output of the following smbclient command:


smbclient -L //remote_system
This should give us the remote server version. Also include on what kind of machine the share is located (Windows 2003 Server, Ubuntu 8.04, NAS box model...)

Samba as a server(samba作为服务端来使用)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
IS IT A REGRESSION ?
Did this use to work properly with a previous release ?

WHAT VERSION OF SAMBA PACKAGES ARE USED ?
Please give the output of:

dpkg-query -W -f='${Package} ${Version} ${Source} ${Status}\n' | grep samba
WHICH CLIENTS ARE FAILING TO CONNECT?
Include the operating system (Windows, Ubuntu) and version (XP, Vista, 8.04) of the client systems failing to connect to the share.

WHAT IS THE ERROR MESSAGE PRODUCED ON THE CLIENT?
OTHER INFORMATION TO INCLUDE
the content of the /etc/samba/smb.conf file

log files found in /var/log/samba/

the output of the smbclient -L //server/

the output of testparm -s

Install/upgrade failure(安装、升级时候报错)

1
2
3
4
5
6
7
8
9
10
STATUS OF SAMBA PACKAGES ON THE SYSTEM
Please give the output of:

dpkg-query -W -f='${Package} ${Version} ${Source} ${Status}\n' | grep samba
OTHER INFORMATION TO INCLUDE
apt and dpkg log files: /var/log/dpkg.log and /var/log/apt/term.log.

/etc/samba/smb.conf (or absence thereof)

In the case of an upgrade was there a prompt for a modified configuration file? If so what steps were taken.

How to Triage(如何识别错误分类)

1
2
3
4
5
6
7
8
9
10
11
12
Identify if the bug falls in one of the generic categories above. If so make sure that the relevant information is available. If not ask for it using one of the stock replies.


Samba as a client


If nautilus fails to connect but smbclient can successfully connect, the bug is related to nautilus. Mark the samba task Invalid and open a new task for nautilus.

If both nautilus and smbclient can not connect, the bug is related to samba.

If cifs cannot connect the bug might be related to CIFS kernelspace (package linux) or userspace (package samba). In doubt, leave it in samba.

Stock Reply(回复)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

SAMBA AS A CLIENT
Use this reply if an Ubuntu system cannot access a remote samba/windows share.


Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it without more information.

Please include the information requested at https://wiki.ubuntu.com/DebuggingSamba#samba-client.
SAMBA AS A SERVER
Use this reply if remote clients cannot access a share provided by an Ubuntu system.


Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it without more information.

Please include the information requested at https://wiki.ubuntu.com/DebuggingSamba#samba-server.
INSTALL/UPGRADE FAILURE
Use this reply if there is a package installation/upgrade failure on the Ubuntu system.


Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it without more information.

Please include the information requested at https://wiki.ubuntu.com/DebuggingSamba#samba-pkg-fail.

Non-bugs(没有bug?)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Install/upgrade failure due to missing /etc/samba/smb.conf file
HOW TO RECOGNIZE IT
This is a case of install/upgrade failure that results in the following error message (potentially translated):

package samba-common <version> failed to install/upgrade: subprocess post-installation script returned error exit status 1
The DpkgTerminalLog.gz (or /var/log/apt/term.log) contains the following message:

Not replacing deleted config file /etc/samba/smb.conf
chmod: cannot access `/etc/samba/smb.conf': No such file or directory
The user should not be able to provide any /etc/samba/smb.conf file, since it is missing.

STOCK ANSWER

Thank you for taking the time to report this bug and helping to make Ubuntu better.

It looks like you manually removed /etc/samba/smb.conf before reinstalling/upgrading samba packages. Configuration files are special files that should be purged by running "apt-get purge", not manually removed.

You can recover from this situation by restoring /etc/samba/smb.conf and restart pending package configuration:
$ sudo cp /usr/share/samba/smb.conf /etc/samba/smb.conf
$ sudo dpkg --configure -a

Alternatively, you can purge samba-common completely and attempt the install/upgrade again:
$ sudo apt-get purge samba-common

This bug will be marked as Invalid: please reopen it if the above steps do not resolve the situation for you. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!
Close the bug report as Invalid.

报错日志

1
2
3
4
5
6
7
log.commu-pc:[2020/03/04 15:14:02.169275,  0] ../source3/auth/auth_domain.c:226(domain_client_validate)
log.commu-pc: domain_client_validate: unable to validate password for user xxx in domain xxx to Domain controller AD-03.XXXX.COM. Error was NT_STATUS_ACCESS_DENIED.
log.commu-pc:[2020/03/04 15:14:09.504618, 0] ../source3/auth/auth_domain.c:226(domain_client_validate)
log.commu-pc: domain_client_validate: unable to validate password for user xxx in domain xxx to Domain controller AD-03.XXXX.COM. Error was NT_STATUS_ACCESS_DENIED.
log.commu-pc:[2020/03/04 15:14:10.669048, 0] ../source3/auth/auth_domain.c:226(domain_client_validate)
log.commu-pc: domain_client_validate: unable to validate password for user xxx in domain xxx to Domain controller AD-03.XXXX.COM. Error was NT_STATUS_ACCESS_DENIED.

分析:

通过日志分析发现 都是 说 某个 user 在 domain controller ad-03 里面 验证密码时候出错。
报这个错误的时候也就是不能 访问 共享目录的时候。
不过这个错误 有时候出现,有时候就能访问共享。

我们的 samba 在Ubuntu上搭建,ubuntu 使用sssd 加入到 AD 域控里面了,
在 windows 上 直接访问 个人账号下面的共享目录是不需要输入密码直接打开的。

确定samba的版本

1
2
 samba -V
Version 4.7.6-Ubuntu

取得samba的源码的版本号

1
2
3
4
5
6
7
8
9
10
11
12
13
$  dpkg-query -W -f='${Package} ${Version} ${Source} ${Status}\n' | grep samba

libsmbclient 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 samba install ok installed
libwbclient0 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 samba install ok installed
python-samba 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 samba install ok installed
samba 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 install ok installed
samba-common 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 samba install ok installed
samba-common-bin 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 samba install ok installed
samba-dsdb-modules 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 samba install ok installed
samba-libs 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 samba install ok installed
samba-vfs-modules 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 samba install ok installed


下载源代码

克隆ubuntu上面的samba软件源代码。

1
$ git clone	https://git.launchpad.net/ubuntu/+source/samba (fetch)

检出对应的tag的代码。这个tag就是通过上面的dpkg-query命令查出来的。

1
2
3
$ git for-each-ref |grep '4.7.6.*2.11'
5b83ed324fba2d49685a5527838ff1bfc8c387bd tag refs/tags/import/2%4.7.6+dfsg_ubuntu-0ubuntu2.11

找到对应的报错日志行的代码 source3/auth/auth_domain.c

错误定位到domain_client_validate 这个方法里面

1
2
3
4
5
6
7
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0,("domain_client_validate: unable to validate password "
"for user %s in domain %s to Domain controller %s. "
"Error was %s.\n", user_info->client.account_name,
user_info->client.domain_name, dc_name,
nt_errstr(nt_status)));

我们返现 ad-03 是 来自 dc_name 这个变量,

下面我们分析这个dc_name 是怎么来的,dc 估计就是 domain controller的缩写吧。

domain_client_validate 方法是在 check_trustdomain_security 中被调用了。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

fstring dc_name;
nt_status = domain_client_validate(mem_ctx,
user_info,
user_info->mapped.domain_name,
(uchar *)auth_context->challenge.data,
server_info,
dc_name,
&dc_ss);
其中的 dc_name 就是由 get_dc_name 方法获得。dc_name 变量在方法开始 定义的。
if ( !get_dc_name(user_info->mapped.domain_name, NULL, dc_name, &dc_ss) ) {
DEBUG(5,("check_trustdomain_security: unable to locate a DC for domain %s\n",
user_info->mapped.domain_name));
return NT_STATUS_NO_LOGON_SERVERS;
}

分析 get_dc_name 方法 source3/libsmb/namequery_dc.c

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
bool get_dc_name(const char *domain,		const char *realm,		fstring srv_name,		struct sockaddr_storage *ss_out)
{
struct sockaddr_storage dc_ss;
bool ret;
bool our_domain = False;

zero_sockaddr(&dc_ss);

ret = False;

if ( strequal(lp_workgroup(), domain) || strequal(lp_realm(), realm) )
our_domain = True;

/* always try to obey what the admin specified in smb.conf
(for the local domain) */

if ( (our_domain && lp_security()==SEC_ADS) || realm ) {
ret = ads_dc_name(domain, realm, &dc_ss, srv_name); // 走到这里调用了
}

if (!domain) {
/* if we have only the realm we can't do anything else */
return False;
}

if (!ret) {
/* fall back on rpc methods if the ADS methods fail */
ret = rpc_dc_name(domain, srv_name, &dc_ss);
}

*ss_out = dc_ss;

return ret;
}

其中该方法的第1个参数 domain=xxxxx 。是通过下面的 log 打印推测出来的。

ads_dc_name方法 source3/libsmb/namequery_dc.c

再附加一段搜 dc-name的日志。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
./log.old:8332:[2020/03/09 14:49:11.416584,  4] ../source3/libsmb/namequery_dc.c:77(ads_dc_name)
./log.old:8333: ads_dc_name: domain=xxxxx
./log.old:8422:[2020/03/09 14:49:11.477957, 4] ../source3/libsmb/namequery_dc.c:151(ads_dc_name)
./log.old:8423: ads_dc_name: using server='DC01.xxxxx.COM' IP=192.168.151
grep: ./cores: Permission denied
./log:6136:[2020/03/09 15:26:59.059731, 4] ../source3/libsmb/namequery_dc.c:77(ads_dc_name)
./log:6137: ads_dc_name: domain=xxxxx
./log:6234:[2020/03/09 15:26:59.226280, 4] ../source3/libsmb/namequery_dc.c:151(ads_dc_name)
./log:6235: ads_dc_name: using server='NJDC.xxxxx.COM' IP=192.168.152
$ grep dc_name -rni .
./log.old:8332:[2020/03/09 14:49:11.416584, 4] ../source3/libsmb/namequery_dc.c:77(ads_dc_name)
./log.old:8333: ads_dc_name: domain=xxxxx
./log.old:8422:[2020/03/09 14:49:11.477957, 4] ../source3/libsmb/namequery_dc.c:151(ads_dc_name)
./log.old:8423: ads_dc_name: using server='DC01.xxxxx.COM' IP=192.168.151
grep: ./cores: Permission denied
./log:6136:[2020/03/09 15:26:59.059731, 4] ../source3/libsmb/namequery_dc.c:77(ads_dc_name)
./log:6137: ads_dc_name: domain=xxxxx
./log:6234:[2020/03/09 15:26:59.226280, 4] ../source3/libsmb/namequery_dc.c:151(ads_dc_name)
./log:6235: ads_dc_name: using server='NJDC.xxxxx.COM' IP=192.168.152


通过上面新增的日志我们看ads_dc_name方法。source3/libsmb/namequery_dc.c

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

/**********************************************************************
Is this our primary domain ?
**********************************************************************/

#ifdef HAVE_KRB5
static bool is_our_primary_domain(const char *domain)
{
int role = lp_server_role();

if ((role == ROLE_DOMAIN_MEMBER) && strequal(lp_workgroup(), domain)) {
return True;
} else if (strequal(get_global_sam_name(), domain)) {
return True;
}
return False;
}
#endif

通过上面新增的日志我们看ads_dc_name方法。source3/libsmb/namequery_dc.c

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/**************************************************************************
Find the name and IP address for a server in the realm/domain
*************************************************************************/
其中该方法的第1个参数 domain=xxxxx 。是通过上面的 log 打印推测出来的。
static bool ads_dc_name(const char *domain, const char *realm, struct sockaddr_storage *dc_ss, fstring srv_name)
{
ADS_STRUCT *ads;
char *sitename;
int i;
char addr[INET6_ADDRSTRLEN];

if (!realm && strequal(domain, lp_workgroup())) {
realm = lp_realm();
}

sitename = sitename_fetch(talloc_tos(), realm);

/* Try this 3 times then give up. */
for( i =0 ; i < 3; i++) {
ads = ads_init(realm, domain, NULL);
if (!ads) {
TALLOC_FREE(sitename);
return False;
}

DEBUG(4,("ads_dc_name: domain=%s\n", domain));

#ifdef HAVE_ADS
/* we don't need to bind, just connect */
ads->auth.flags |= ADS_AUTH_NO_BIND;
ads_connect(ads);
#endif

if (!ads->config.realm) {
TALLOC_FREE(sitename);
ads_destroy(&ads);
return False;
}

/* Now we've found a server, see if our sitename
has changed. If so, we need to re-do the DNS query
to ensure we only find servers in our site. */

if (stored_sitename_changed(realm, sitename)) {
TALLOC_FREE(sitename);
sitename = sitename_fetch(talloc_tos(), realm);
ads_destroy(&ads);
/* Ensure we don't cache the DC we just connected to. */
namecache_delete(realm, 0x1C);
namecache_delete(domain, 0x1C);
continue;
}

#ifdef HAVE_ADS
if (is_our_primary_domain(domain) && (ads->config.flags & NBT_SERVER_KDC)) {
if (ads_closest_dc(ads)) {
/* We're going to use this KDC for this realm/domain.
If we are using sites, then force the krb5 libs
to use this KDC. */

create_local_private_krb5_conf_for_domain(realm,
domain,
sitename,
&ads->ldap.ss);
} else {
create_local_private_krb5_conf_for_domain(realm,
domain,
NULL,
&ads->ldap.ss);
}
}
#endif
break;
}

if (i == 3) {
DEBUG(1,("ads_dc_name: sitename (now \"%s\") keeps changing ???\n",
sitename ? sitename : ""));
TALLOC_FREE(sitename);
ads_destroy(&ads);
return False;
}

TALLOC_FREE(sitename);

fstrcpy(srv_name, ads->config.ldap_server_name); // srv_name 这里从 ads->config.ldap_server_name 复制过去的一个字符串。
if (!strupper_m(srv_name)) {
ads_destroy(&ads);
return false;
}
#ifdef HAVE_ADS
*dc_ss = ads->ldap.ss;
#else
zero_sockaddr(dc_ss);
#endif
ads_destroy(&ads);

print_sockaddr(addr, sizeof(addr), dc_ss);
DEBUG(4,("ads_dc_name: using server='%s' IP=%s\n",
srv_name, addr));

return True;
}

rpc_dc_name

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/****************************************************************************
Utility function to return the name of a DC. The name is guaranteed to be
valid since we have already done a name_status_find on it
***************************************************************************/

static bool rpc_dc_name(const char *domain,
fstring srv_name,
struct sockaddr_storage *ss_out)
{
struct ip_service *ip_list = NULL;
struct sockaddr_storage dc_ss;
int count, i;
NTSTATUS result;
char addr[INET6_ADDRSTRLEN];

/* get a list of all domain controllers */

if (!NT_STATUS_IS_OK(get_sorted_dc_list(domain, NULL, &ip_list, &count,
False))) {
DEBUG(3, ("Could not look up dc's for domain %s\n", domain));
return False;
}

/* Remove the entry we've already failed with (should be the PDC). */

for (i = 0; i < count; i++) {
if (is_zero_addr(&ip_list[i].ss))
continue;

if (name_status_find(domain, 0x1c, 0x20, &ip_list[i].ss, srv_name)) {
result = check_negative_conn_cache( domain, srv_name );
if ( NT_STATUS_IS_OK(result) ) {
dc_ss = ip_list[i].ss;
goto done;
}
}
}

SAFE_FREE(ip_list);

/* No-one to talk to )-: */
return False; /* Boo-hoo */

done:
/* We have the netbios name and IP address of a domain controller.
Ideally we should sent a SAMLOGON request to determine whether
the DC is alive and kicking. If we can catch a dead DC before
performing a cli_connect() we can avoid a 30-second timeout. */

print_sockaddr(addr, sizeof(addr), &dc_ss);
DEBUG(3, ("rpc_dc_name: Returning DC %s (%s) for domain %s\n", srv_name,
addr, domain));

*ss_out = dc_ss;
SAFE_FREE(ip_list);

return True;
}

debug level 还可以大于11

发现debug level 还可以大于11呢。于是直接调到了20.输出如下日志。

ADS_STATUS ads_connect(ADS_STRUCT *ads) 方法中的一个调试输出。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
	if (DEBUGLEVEL >= 11) {
char *s = NDR_PRINT_STRUCT_STRING(talloc_tos(), ads_struct, ads);
DEBUG(11,("ads_connect: entering\n"));
DEBUGADD(11,("%s\n", s));
TALLOC_FREE(s);
}
通过代码发现 是 直接 dump出来了整个 ads_struct 结构体。
log.old: ads_connect: entering
log.old- ads: struct ads_struct
log.old- is_mine : true
log.old- ads: struct server
log.old- realm : 'xxxx.COM'
log.old- workgroup : 'xxxxxx'
log.old- ldap_server : NULL
log.old- ads: struct auth
log.old- realm : NULL
log.old- password : '(PASSWORD omitted)'
log.old- user_name : NULL
log.old- kdc_server : NULL
log.old- flags : 0x00000022 (34)
log.old- 0: ADS_AUTH_DISABLE_KERBEROS
log.old- 1: ADS_AUTH_NO_BIND
log.old- 0: ADS_AUTH_ANON_BIND
log.old- 0: ADS_AUTH_SIMPLE_BIND
log.old- 0: ADS_AUTH_ALLOW_NTLMSSP
log.old- 1: ADS_AUTH_SASL_SIGN
log.old- 0: ADS_AUTH_SASL_SEAL
log.old- 0: ADS_AUTH_SASL_FORCE
log.old- 0: ADS_AUTH_USER_CREDS
log.old- time_offset : 0x00000000 (0)
log.old- tgt_expire : (time_t)0
log.old- tgs_expire : (time_t)0
log.old- renewable : (time_t)0
log.old- ads: struct config
log.old- flags : 0x00000000 (0)
log.old- 0: DS_SERVER_PDC
log.old- 0: DS_SERVER_GC
log.old- 0: DS_SERVER_LDAP
log.old- 0: DS_SERVER_DS
log.old- 0: DS_SERVER_KDC
log.old- 0: DS_SERVER_TIMESERV
log.old- 0: DS_SERVER_CLOSEST
log.old- 0: DS_SERVER_WRITABLE
log.old- 0: DS_SERVER_GOOD_TIMESERV
log.old- 0: DS_SERVER_NDNC
log.old- 0: DS_SERVER_SELECT_SECRET_DOMAIN_6
log.old- 0: DS_SERVER_FULL_SECRET_DOMAIN_6
log.old- 0: DS_SERVER_WEBSERV
log.old- 0: DS_SERVER_DS_8
log.old- 0: DS_DNS_CONTROLLER
log.old- 0: DS_DNS_DOMAIN
log.old- 0: DS_DNS_FOREST_ROOT
log.old- realm : NULL
log.old- bind_path : NULL
log.old- ldap_server_name : NULL
log.old- server_site_name : NULL
log.old- client_site_name : NULL
log.old- current_time : (time_t)0
log.old- schema_path : NULL
log.old- config_path : NULL
log.old- ads: struct ldap
log.old- ld : NULL
log.old- ss :
log.old- last_attempt : Tue Jan 6 07:57:53 AM 1970 CST
log.old- port : 0x00000000 (0)
log.old- saslwrap: struct saslwrap
log.old- wrap_type : 0x0001 (1)
log.old- sbiod : NULL
log.old- mem_ctx : NULL
log.old- wrap_ops : NULL
log.old- wrap_private_data : NULL
log.old- saslwrap: struct in
log.old- ofs : 0x00000000 (0)
log.old- needed : 0x00000000 (0)
log.old- left : 0x00000000 (0)
log.old- max_wrapped : 0x00000000 (0)
log.old- min_wrapped : 0x00000000 (0)
log.old- size : 0x00000000 (0)
log.old- buf: ARRAY(0) : NULL
log.old- saslwrap: struct out
log.old- ofs : 0x00000000 (0)
log.old- left : 0x00000000 (0)
log.old- max_unwrapped : 0x00000000 (0)
log.old- sig_size : 0x00000000 (0)
log.old- size : 0x00000000 (0)
log.old- buf: ARRAY(0) : NULL
log.old-


再次分析到 resolve_and_ping_dns方法中

1
2
3
4
5
6
7
8
9
10
11
12
13
static NTSTATUS resolve_and_ping_dns(ADS_STRUCT *ads, const char *sitename,	 const char *realm)

$ grep resolve_and_ping_dns log*
log.old:[2020/03/09 17:33:45.894215, 6, pid=8229, effective(0, 0), real(0, 0)] ../source3/libads/ldap.c:419(resolve_and_ping_dns)
log.old: resolve_and_ping_dns: (cldap) looking for realm 'xxx.COM'
log.old:[2020/03/09 17:33:46.611538, 6, pid=8230, effective(0, 0), real(0, 0)] ../source3/libads/ldap.c:419(resolve_and_ping_dns)
log.old: resolve_and_ping_dns: (cldap) looking for realm 'xxxx.COM'
log.old:[2020/03/09 17:33:47.319183, 6, pid=8231, effective(0, 0), real(0, 0)] ../source3/libads/ldap.c:419(resolve_and_ping_dns)
log.old: resolve_and_ping_dns: (cldap) looking for realm 'xxxxxxxx.COM'
log.old:[2020/03/09 17:33:48.092824, 6, pid=8233, effective(0, 0), real(0, 0)] ../source3/libads/ldap.c:419(resolve_and_ping_dns)
log.old: resolve_and_ping_dns: (cldap) looking for realm 'xxxx.COM'
log.old:[2020/03/09 17:33:48.814634, 6, pid=8235, effective(0, 0), real(0, 0)] ../source3/libads/ldap.c:419(resolve_and_ping_dns)
log.old: resolve_and_ping_dns: (cldap) looking for realm 'xxx.COM'

再次分析,得到 get_sorted_dc_list 方法

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

/*********************************************************************
Small wrapper function to get the DC list and sort it if neccessary.
*********************************************************************/

NTSTATUS get_sorted_dc_list( const char *domain,
const char *sitename,
struct ip_service **ip_list,
int *count,
bool ads_only )

$ grep get_sorted_dc_list log*
log:[2020/03/09 17:41:53.921164, 8, pid=8313, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3355(get_sorted_dc_list)
log: get_sorted_dc_list: attempting lookup for name xxx.COM (sitename Default-First-Site-Name)
log.old:[2020/03/09 17:41:49.792818, 8, pid=8308, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3355(get_sorted_dc_list)
log.old: get_sorted_dc_list: attempting lookup for name xxx.COM (sitename Default-First-Site-Name)
log.old:[2020/03/09 17:41:50.510170, 8, pid=8309, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3355(get_sorted_dc_list)
log.old: get_sorted_dc_list: attempting lookup for name xxx.COM (sitename Default-First-Site-Name)
log.old:[2020/03/09 17:41:51.499312, 8, pid=8310, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3355(get_sorted_dc_list)
log.old: get_sorted_dc_list: attempting lookup for name xxx.COM (sitename Default-First-Site-Name)
log.old:[2020/03/09 17:41:52.207439, 8, pid=8311, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3355(get_sorted_dc_list)
log.old: get_sorted_dc_list: attempting lookup for name xxx.COM (sitename Default-First-Site-Name)
log.old:[2020/03/09 17:41:52.914030, 8, pid=8312, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3355(get_sorted_dc_list)
log.old: get_sorted_dc_list: attempting lookup for name xxx.COM (sitename Default-First-Site-Name)


下面走到get_dc_list 方法。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
/********************************************************
Get the IP address list of the domain controllers for
a domain.
*********************************************************/

static NTSTATUS get_dc_list(const char *domain,
const char *sitename,
struct ip_service **ip_list,
int *count,
enum dc_lookup_type lookup_type,
bool *ordered)
$ grep get_dc_list log*
log:[2020/03/09 17:43:16.029160, 3, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:16.029280, 8, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:16.030213, 4, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log: get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:16.030235, 4, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log: get_dc_list: 192.168.17.228:389 192.168.13.251:389 192.168.31.251:389 192.168.13.252:389
log:[2020/03/09 17:43:16.063366, 3, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:16.065864, 8, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:16.066247, 4, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log: get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:16.066276, 4, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log: get_dc_list: 192.168.17.228:88 192.168.13.252:88 192.168.31.251:88 192.168.13.251:88
log:[2020/03/09 17:43:16.066381, 3, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:16.068330, 8, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:16.068704, 4, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log: get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:16.068732, 4, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log: get_dc_list: 192.168.17.228:88 192.168.13.252:88 192.168.13.251:88 192.168.31.251:88
log:[2020/03/09 17:43:16.700775, 3, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:16.700859, 8, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:16.701415, 4, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log: get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:16.701430, 4, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log: get_dc_list: 192.168.17.228:389 192.168.13.251:389 192.168.31.251:389 192.168.13.252:389
log:[2020/03/09 17:43:16.733917, 3, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:16.736368, 8, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:16.736750, 4, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log: get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:16.736779, 4, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log: get_dc_list: 192.168.17.228:88 192.168.13.252:88 192.168.31.251:88 192.168.13.251:88
log:[2020/03/09 17:43:16.736901, 3, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:16.739348, 8, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:16.739741, 4, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log: get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:16.739770, 4, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log: get_dc_list: 192.168.17.228:88 192.168.13.251:88 192.168.31.251:88 192.168.13.252:88
log:[2020/03/09 17:43:17.368729, 3, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:17.368867, 8, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:17.369858, 4, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log: get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:17.369881, 4, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log: get_dc_list: 192.168.17.228:389 192.168.13.251:389 192.168.31.251:389 192.168.13.252:389
log:[2020/03/09 17:43:17.402505, 3, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:17.406303, 8, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:17.406739, 4, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log: get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:17.406769, 4, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log: get_dc_list: 192.168.17.228:88 192.168.13.252:88 192.168.31.251:88 192.168.13.251:88
log:[2020/03/09 17:43:17.406876, 3, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:17.410338, 8, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:17.410751, 4, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log: get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:17.410780, 4, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log: get_dc_list: 192.168.17.228:88 192.168.31.251:88 192.168.13.252:88 192.168.13.251:88
log:[2020/03/09 17:43:37.768653, 3, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:37.768814, 8, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:37.769616, 4, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log: get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:37.769634, 4, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log: get_dc_list: 192.168.17.228:389 192.168.13.251:389 192.168.31.251:389 192.168.13.252:389
log:[2020/03/09 17:43:37.802598, 3, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:37.804922, 8, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:37.805329, 4, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log: get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:37.805358, 4, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log: get_dc_list: 192.168.17.228:88 192.168.31.251:88 192.168.13.251:88 192.168.13.252:88
log:[2020/03/09 17:43:37.805464, 3, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:37.807314, 8, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:37.807684, 4, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log: get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:37.807712, 4, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log: get_dc_list: 192.168.17.228:88 192.168.31.251:88 192.168.13.252:88 192.168.13.251:88
log.old:[2020/03/09 17:43:05.751178, 3, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:05.751318, 8, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:05.752314, 4, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old: get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:05.752332, 4, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old: get_dc_list: 192.168.17.228:389 192.168.13.251:389 192.168.31.251:389 192.168.13.252:389
log.old:[2020/03/09 17:43:05.786412, 3, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:05.791044, 8, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:05.791442, 4, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old: get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:05.791471, 4, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old: get_dc_list: 192.168.17.228:88 192.168.13.252:88 192.168.31.251:88 192.168.13.251:88
log.old:[2020/03/09 17:43:05.791576, 3, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:05.794197, 8, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:05.794579, 4, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old: get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:05.794608, 4, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old: get_dc_list: 192.168.17.228:88 192.168.13.251:88 192.168.31.251:88 192.168.13.252:88
log.old:[2020/03/09 17:43:13.692054, 3, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:13.692174, 8, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:13.693051, 4, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old: get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:13.693073, 4, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old: get_dc_list: 192.168.17.228:389 192.168.13.251:389 192.168.31.251:389 192.168.13.252:389
log.old:[2020/03/09 17:43:13.725263, 3, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:13.727528, 8, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:13.727913, 4, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old: get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:13.727942, 4, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old: get_dc_list: 192.168.17.228:88 192.168.13.252:88 192.168.31.251:88 192.168.13.251:88
log.old:[2020/03/09 17:43:13.728049, 3, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:13.729936, 8, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:13.730305, 4, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old: get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:13.730334, 4, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old: get_dc_list: 192.168.17.228:88 192.168.31.251:88 192.168.13.252:88 192.168.13.251:88
log.old:[2020/03/09 17:43:14.659077, 3, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:14.659178, 8, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:14.660000, 4, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old: get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:14.660018, 4, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old: get_dc_list: 192.168.17.228:389 192.168.13.251:389 192.168.31.251:389 192.168.13.252:389
log.old:[2020/03/09 17:43:14.692762, 3, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:14.695040, 8, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:14.695438, 4, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old: get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:14.695467, 4, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old: get_dc_list: 192.168.17.228:88 192.168.31.251:88 192.168.13.251:88 192.168.13.252:88
log.old:[2020/03/09 17:43:14.695573, 3, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:14.703135, 8, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:14.703515, 4, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old: get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:14.703544, 4, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old: get_dc_list: 192.168.17.228:88 192.168.31.251:88 192.168.13.252:88 192.168.13.251:88
log.old:[2020/03/09 17:43:15.350163, 3, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:15.350251, 8, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:15.350999, 4, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old: get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:15.351014, 4, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old: get_dc_list: 192.168.17.228:389 192.168.13.251:389 192.168.31.251:389 192.168.13.252:389
log.old:[2020/03/09 17:43:15.383322, 3, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:15.385822, 8, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:15.386205, 4, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old: get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:15.386234, 4, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old: get_dc_list: 192.168.17.228:88 192.168.13.251:88 192.168.13.252:88 192.168.31.251:88
log.old:[2020/03/09 17:43:15.386341, 3, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old: get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:15.391064, 8, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:15.391461, 4, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old: get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:15.391490, 4, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old: get_dc_list: 192.168.17.228:88 192.168.13.252:88 192.168.13.251:88 192.168.31.251:88



日志

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
  no entry for trusted domain magesfc found.
[2022/11/08 12:38:14.907006, 5, pid=94605, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:62(make_user_info)
attempting to make a user_info for magesfc (magesfc)
[2022/11/08 12:38:14.907022, 5, pid=94605, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:70(make_user_info)
making strings for magesfc's user_info struct
[2022/11/08 12:38:14.907039, 5, pid=94605, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:108(make_user_info)
making blobs for magesfc's user_info struct
[2022/11/08 12:38:14.907053, 10, pid=94605, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:159(make_user_info)
made a user_info for magesfc (magesfc)
[2022/11/08 12:38:14.907067, 3, pid=94605, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:178(auth_check_ntlm_password)
check_ntlm_password: Checking password for unmapped user [magesfc]\[magesfc]@[magesfc-ma] with the new password interface
[2022/11/08 12:38:14.907082, 3, pid=94605, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:181(auth_check_ntlm_password)
check_ntlm_password: mapped user is: [magesfc]\[magesfc]@[magesfc-ma]
[2022/11/08 12:38:14.907096, 10, pid=94605, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:190(auth_check_ntlm_password)
check_ntlm_password: auth_context challenge created by random
--
[0000] BD AB 52 70 22 63 0E 28 ..Rp"c.(
[2022/11/08 12:38:14.907150, 10, pid=94605, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_builtin.c:41(check_guest_security)
Check auth for: [magesfc]
[2022/11/08 12:38:14.907164, 10, pid=94605, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:233(auth_check_ntlm_password)
check_ntlm_password: guest had nothing to say
[2022/11/08 12:38:14.907178, 10, pid=94605, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_sam.c:75(auth_samstrict_auth)
Check auth for: [magesfc]
[2022/11/08 12:38:14.907203, 8, pid=94605, effective(0, 0), real(0, 0)] ../source3/lib/util.c:1206(is_myname)
is_myname("magesfc") returns 0
--
check_ntlm_password: sam had nothing to say
[2022/11/08 12:38:14.907245, 10, pid=94605, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_winbind.c:50(check_winbind_security)
Check auth for: [magesfc]
[2022/11/08 12:38:14.907261, 4, pid=94605, effective(0, 0), real(0, 0)] ../source3/smbd/sec_ctx.c:217(push_sec_ctx)
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
--
check_winbind_security: wbcAuthenticateUserEx failed: WBC_ERR_WINBIND_NOT_AVAILABLE
[2022/11/08 12:38:14.907397, 10, pid=94605, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_domain.c:280(check_ntdomain_security)
Check auth for: [magesfc]
[2022/11/08 12:38:14.907427, 5, pid=94605, effective(0, 0), real(0, 0)] ../source3/libads/sitename_cache.c:105(sitename_fetch)
sitename_fetch: Returning sitename for magesfc.COM: "Default-First-Site-Name"
--
size : 0x0012 (18)
string : *
string : 'magesfc'
workstation: struct lsa_String
length : 0x0016 (22)
--
result : NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:15.398514, 0, pid=94605, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_domain.c:225(domain_client_validate)
domain_client_validate: unable to validate password for user magesfc in domain magesfc to Domain controller zzew.magesfc.COM. Error was NT_STATUS_ACCESS_DENIED.
[2022/11/08 12:38:15.427625, 5, pid=94605, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:252(auth_check_ntlm_password)
check_ntlm_password: winbind authentication for user [magesfc] FAILED with error NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:15.427668, 2, pid=94605, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:315(auth_check_ntlm_password)
check_ntlm_password: Authentication for user [magesfc] -> [magesfc] FAILED with error NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:15.427686, 5, pid=94605, effective(0, 0), real(0, 0)] ../source3/auth/auth_ntlmssp.c:188(auth3_check_password)
Checking NTLMSSP password for magesfc\magesfc failed: NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:15.427704, 5, pid=94605, effective(0, 0), real(0, 0)] ../auth/ntlmssp/ntlmssp_server.c:737(ntlmssp_server_check_password)
../auth/ntlmssp/ntlmssp_server.c:737: Checking NTLMSSP password for magesfc\magesfc failed: NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:15.427722, 2, pid=94605, effective(0, 0), real(0, 0)] ../auth/gensec/spnego.c:716(gensec_spnego_server_negTokenTarg)
SPNEGO login failed: NT_STATUS_ACCESS_DENIED
--
UserNameMaxLen : 0x0012 (18)
UserName : *
UserName : 'magesfc'
WorkstationLen : 0x0012 (18)
WorkstationMaxLen : 0x0012 (18)
--
NTLMRevisionCurrent : NTLMSSP_REVISION_W2K3 (15)
[2022/11/08 12:38:15.500173, 3, pid=94608, effective(0, 0), real(0, 0)] ../auth/ntlmssp/ntlmssp_server.c:452(ntlmssp_server_preauth)
Got user=[magesfc] domain=[magesfc] workstation=[magesfc-ma] len1=24 len2=242
[2022/11/08 12:38:15.500194, 6, pid=94608, effective(0, 0), real(0, 0)] ../librpc/ndr/ndr_string.c:171(ndr_pull_string)
short string '', sent with NULL termination despite NOTERM flag in IDL
--
adding IPC service
[2022/11/08 12:38:15.501734, 5, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_util.c:117(make_user_info_map)
Mapping user [magesfc]\[magesfc] from workstation [magesfc-ma]
[2022/11/08 12:38:15.501770, 10, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_util.c:1563(is_trusted_domain)
wb_is_trusted_domain returned error: WBC_ERR_WINBIND_NOT_AVAILABLE
--
no entry for trusted domain magesfc found.
[2022/11/08 12:38:15.962093, 5, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:62(make_user_info)
attempting to make a user_info for magesfc (magesfc)
[2022/11/08 12:38:15.962108, 5, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:70(make_user_info)
making strings for magesfc's user_info struct
[2022/11/08 12:38:15.962125, 5, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:108(make_user_info)
making blobs for magesfc's user_info struct
[2022/11/08 12:38:15.962139, 10, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:159(make_user_info)
made a user_info for magesfc (magesfc)
[2022/11/08 12:38:15.962153, 3, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:178(auth_check_ntlm_password)
check_ntlm_password: Checking password for unmapped user [magesfc]\[magesfc]@[magesfc-ma] with the new password interface
[2022/11/08 12:38:15.962167, 3, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:181(auth_check_ntlm_password)
check_ntlm_password: mapped user is: [magesfc]\[magesfc]@[magesfc-ma]
[2022/11/08 12:38:15.962181, 10, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:190(auth_check_ntlm_password)
check_ntlm_password: auth_context challenge created by random
--
[0000] 7D FB 98 C1 66 BC 9D A8 }...f...
[2022/11/08 12:38:15.962243, 10, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_builtin.c:41(check_guest_security)
Check auth for: [magesfc]
[2022/11/08 12:38:15.962258, 10, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:233(auth_check_ntlm_password)
check_ntlm_password: guest had nothing to say
[2022/11/08 12:38:15.962273, 10, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_sam.c:75(auth_samstrict_auth)
Check auth for: [magesfc]
[2022/11/08 12:38:15.962287, 8, pid=94608, effective(0, 0), real(0, 0)] ../source3/lib/util.c:1206(is_myname)
is_myname("magesfc") returns 0
--
check_ntlm_password: sam had nothing to say
[2022/11/08 12:38:15.962329, 10, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_winbind.c:50(check_winbind_security)
Check auth for: [magesfc]
[2022/11/08 12:38:15.962343, 4, pid=94608, effective(0, 0), real(0, 0)] ../source3/smbd/sec_ctx.c:217(push_sec_ctx)
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
--
check_winbind_security: wbcAuthenticateUserEx failed: WBC_ERR_WINBIND_NOT_AVAILABLE
[2022/11/08 12:38:15.962472, 10, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_domain.c:280(check_ntdomain_security)
Check auth for: [magesfc]
[2022/11/08 12:38:15.962499, 5, pid=94608, effective(0, 0), real(0, 0)] ../source3/libads/sitename_cache.c:105(sitename_fetch)
sitename_fetch: Returning sitename for magesfc.COM: "Default-First-Site-Name"
--
size : 0x0012 (18)
string : *
string : 'magesfc'
workstation: struct lsa_String
length : 0x0016 (22)
--
result : NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:16.351944, 0, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_domain.c:225(domain_client_validate)
domain_client_validate: unable to validate password for user magesfc in domain magesfc to Domain controller zzew.magesfc.COM. Error was NT_STATUS_ACCESS_DENIED.
[2022/11/08 12:38:16.380998, 5, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:252(auth_check_ntlm_password)
check_ntlm_password: winbind authentication for user [magesfc] FAILED with error NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:16.381041, 2, pid=94608, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:315(auth_check_ntlm_password)
check_ntlm_password: Authentication for user [magesfc] -> [magesfc] FAILED with error NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:16.381058, 5, pid=94608, effective(0, 0), real(0, 0)] ../source3/auth/auth_ntlmssp.c:188(auth3_check_password)
Checking NTLMSSP password for magesfc\magesfc failed: NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:16.381075, 5, pid=94608, effective(0, 0), real(0, 0)] ../auth/ntlmssp/ntlmssp_server.c:737(ntlmssp_server_check_password)
../auth/ntlmssp/ntlmssp_server.c:737: Checking NTLMSSP password for magesfc\magesfc failed: NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:16.381091, 2, pid=94608, effective(0, 0), real(0, 0)] ../auth/gensec/spnego.c:716(gensec_spnego_server_negTokenTarg)
SPNEGO login failed: NT_STATUS_ACCESS_DENIED
--
UserNameMaxLen : 0x0012 (18)
UserName : *
UserName : 'magesfc'
WorkstationLen : 0x0012 (18)
WorkstationMaxLen : 0x0012 (18)
--
NTLMRevisionCurrent : NTLMSSP_REVISION_W2K3 (15)
[2022/11/08 12:38:16.453433, 3, pid=94609, effective(0, 0), real(0, 0)] ../auth/ntlmssp/ntlmssp_server.c:452(ntlmssp_server_preauth)
Got user=[magesfc] domain=[magesfc] workstation=[magesfc-ma] len1=24 len2=242
[2022/11/08 12:38:16.453458, 6, pid=94609, effective(0, 0), real(0, 0)] ../librpc/ndr/ndr_string.c:171(ndr_pull_string)
short string '', sent with NULL termination despite NOTERM flag in IDL
--
adding IPC service
[2022/11/08 12:38:16.455200, 5, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_util.c:117(make_user_info_map)
Mapping user [magesfc]\[magesfc] from workstation [magesfc-ma]
[2022/11/08 12:38:16.455248, 10, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_util.c:1563(is_trusted_domain)
wb_is_trusted_domain returned error: WBC_ERR_WINBIND_NOT_AVAILABLE
--
no entry for trusted domain magesfc found.
[2022/11/08 12:38:16.842716, 5, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:62(make_user_info)
attempting to make a user_info for magesfc (magesfc)
[2022/11/08 12:38:16.842732, 5, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:70(make_user_info)
making strings for magesfc's user_info struct
[2022/11/08 12:38:16.842748, 5, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:108(make_user_info)
making blobs for magesfc's user_info struct
[2022/11/08 12:38:16.842763, 10, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:159(make_user_info)
made a user_info for magesfc (magesfc)
[2022/11/08 12:38:16.842776, 3, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:178(auth_check_ntlm_password)
check_ntlm_password: Checking password for unmapped user [magesfc]\[magesfc]@[magesfc-ma] with the new password interface
[2022/11/08 12:38:16.842791, 3, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:181(auth_check_ntlm_password)
check_ntlm_password: mapped user is: [magesfc]\[magesfc]@[magesfc-ma]
[2022/11/08 12:38:16.842804, 10, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:190(auth_check_ntlm_password)
check_ntlm_password: auth_context challenge created by random
--
[0000] 9F 03 84 48 80 27 93 DD ...H.'..
[2022/11/08 12:38:16.842859, 10, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_builtin.c:41(check_guest_security)
Check auth for: [magesfc]
[2022/11/08 12:38:16.842873, 10, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:233(auth_check_ntlm_password)
check_ntlm_password: guest had nothing to say
[2022/11/08 12:38:16.842888, 10, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_sam.c:75(auth_samstrict_auth)
Check auth for: [magesfc]
[2022/11/08 12:38:16.842902, 8, pid=94609, effective(0, 0), real(0, 0)] ../source3/lib/util.c:1206(is_myname)
is_myname("magesfc") returns 0
--
check_ntlm_password: sam had nothing to say
[2022/11/08 12:38:16.842943, 10, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_winbind.c:50(check_winbind_security)
Check auth for: [magesfc]
[2022/11/08 12:38:16.842958, 4, pid=94609, effective(0, 0), real(0, 0)] ../source3/smbd/sec_ctx.c:217(push_sec_ctx)
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
--
check_winbind_security: wbcAuthenticateUserEx failed: WBC_ERR_WINBIND_NOT_AVAILABLE
[2022/11/08 12:38:16.843098, 10, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_domain.c:280(check_ntdomain_security)
Check auth for: [magesfc]
[2022/11/08 12:38:16.843126, 5, pid=94609, effective(0, 0), real(0, 0)] ../source3/libads/sitename_cache.c:105(sitename_fetch)
sitename_fetch: Returning sitename for magesfc.COM: "Default-First-Site-Name"
--
size : 0x0012 (18)
string : *
string : 'magesfc'
workstation: struct lsa_String
length : 0x0016 (22)
--
result : NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:17.300301, 0, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_domain.c:225(domain_client_validate)
domain_client_validate: unable to validate password for user magesfc in domain magesfc to Domain controller zzew.magesfc.COM. Error was NT_STATUS_ACCESS_DENIED.
[2022/11/08 12:38:17.329385, 5, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:252(auth_check_ntlm_password)
check_ntlm_password: winbind authentication for user [magesfc] FAILED with error NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:17.329429, 2, pid=94609, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:315(auth_check_ntlm_password)
check_ntlm_password: Authentication for user [magesfc] -> [magesfc] FAILED with error NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:17.329456, 5, pid=94609, effective(0, 0), real(0, 0)] ../source3/auth/auth_ntlmssp.c:188(auth3_check_password)
Checking NTLMSSP password for magesfc\magesfc failed: NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:17.329474, 5, pid=94609, effective(0, 0), real(0, 0)] ../auth/ntlmssp/ntlmssp_server.c:737(ntlmssp_server_check_password)
../auth/ntlmssp/ntlmssp_server.c:737: Checking NTLMSSP password for magesfc\magesfc failed: NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:17.329490, 2, pid=94609, effective(0, 0), real(0, 0)] ../auth/gensec/spnego.c:716(gensec_spnego_server_negTokenTarg)
SPNEGO login failed: NT_STATUS_ACCESS_DENIED
--
UserNameMaxLen : 0x0012 (18)
UserName : *
UserName : 'magesfc'
WorkstationLen : 0x0012 (18)
WorkstationMaxLen : 0x0012 (18)
--
NTLMRevisionCurrent : NTLMSSP_REVISION_W2K3 (15)
[2022/11/08 12:38:17.399753, 3, pid=94610, effective(0, 0), real(0, 0)] ../auth/ntlmssp/ntlmssp_server.c:452(ntlmssp_server_preauth)
Got user=[magesfc] domain=[magesfc] workstation=[magesfc-ma] len1=24 len2=242
[2022/11/08 12:38:17.399775, 6, pid=94610, effective(0, 0), real(0, 0)] ../librpc/ndr/ndr_string.c:171(ndr_pull_string)
short string '', sent with NULL termination despite NOTERM flag in IDL
--
adding IPC service
[2022/11/08 12:38:17.401428, 5, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_util.c:117(make_user_info_map)
Mapping user [magesfc]\[magesfc] from workstation [magesfc-ma]
[2022/11/08 12:38:17.401471, 10, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_util.c:1563(is_trusted_domain)
wb_is_trusted_domain returned error: WBC_ERR_WINBIND_NOT_AVAILABLE
--
no entry for trusted domain magesfc found.
[2022/11/08 12:38:17.889144, 5, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:62(make_user_info)
attempting to make a user_info for magesfc (magesfc)
[2022/11/08 12:38:17.889159, 5, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:70(make_user_info)
making strings for magesfc's user_info struct
[2022/11/08 12:38:17.889187, 5, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:108(make_user_info)
making blobs for magesfc's user_info struct
[2022/11/08 12:38:17.889202, 10, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:159(make_user_info)
made a user_info for magesfc (magesfc)
[2022/11/08 12:38:17.889215, 3, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:178(auth_check_ntlm_password)
check_ntlm_password: Checking password for unmapped user [magesfc]\[magesfc]@[magesfc-ma] with the new password interface
[2022/11/08 12:38:17.889231, 3, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:181(auth_check_ntlm_password)
check_ntlm_password: mapped user is: [magesfc]\[magesfc]@[magesfc-ma]
[2022/11/08 12:38:17.889244, 10, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:190(auth_check_ntlm_password)
check_ntlm_password: auth_context challenge created by random
--
[0000] 65 4C F6 CC 8F 17 D8 3D eL.....=
[2022/11/08 12:38:17.889298, 10, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_builtin.c:41(check_guest_security)
Check auth for: [magesfc]
[2022/11/08 12:38:17.889311, 10, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:233(auth_check_ntlm_password)
check_ntlm_password: guest had nothing to say
[2022/11/08 12:38:17.889326, 10, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_sam.c:75(auth_samstrict_auth)
Check auth for: [magesfc]
[2022/11/08 12:38:17.889340, 8, pid=94610, effective(0, 0), real(0, 0)] ../source3/lib/util.c:1206(is_myname)
is_myname("magesfc") returns 0
--
check_ntlm_password: sam had nothing to say
[2022/11/08 12:38:17.889396, 10, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_winbind.c:50(check_winbind_security)
Check auth for: [magesfc]
[2022/11/08 12:38:17.889411, 4, pid=94610, effective(0, 0), real(0, 0)] ../source3/smbd/sec_ctx.c:217(push_sec_ctx)
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
--
check_winbind_security: wbcAuthenticateUserEx failed: WBC_ERR_WINBIND_NOT_AVAILABLE
[2022/11/08 12:38:17.889541, 10, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_domain.c:280(check_ntdomain_security)
Check auth for: [magesfc]
[2022/11/08 12:38:17.889581, 5, pid=94610, effective(0, 0), real(0, 0)] ../source3/libads/sitename_cache.c:105(sitename_fetch)
sitename_fetch: Returning sitename for magesfc.COM: "Default-First-Site-Name"
--
size : 0x0012 (18)
string : *
string : 'magesfc'
workstation: struct lsa_String
length : 0x0016 (22)
--
result : NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:18.358816, 0, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_domain.c:225(domain_client_validate)
domain_client_validate: unable to validate password for user magesfc in domain magesfc to Domain controller zzew.magesfc.COM. Error was NT_STATUS_ACCESS_DENIED.
[2022/11/08 12:38:18.387800, 5, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:252(auth_check_ntlm_password)
check_ntlm_password: winbind authentication for user [magesfc] FAILED with error NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:18.387843, 2, pid=94610, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:315(auth_check_ntlm_password)
check_ntlm_password: Authentication for user [magesfc] -> [magesfc] FAILED with error NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:18.387861, 5, pid=94610, effective(0, 0), real(0, 0)] ../source3/auth/auth_ntlmssp.c:188(auth3_check_password)
Checking NTLMSSP password for magesfc\magesfc failed: NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:18.387877, 5, pid=94610, effective(0, 0), real(0, 0)] ../auth/ntlmssp/ntlmssp_server.c:737(ntlmssp_server_check_password)
../auth/ntlmssp/ntlmssp_server.c:737: Checking NTLMSSP password for magesfc\magesfc failed: NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:18.387894, 2, pid=94610, effective(0, 0), real(0, 0)] ../auth/gensec/spnego.c:716(gensec_spnego_server_negTokenTarg)
SPNEGO login failed: NT_STATUS_ACCESS_DENIED
--
UserNameMaxLen : 0x0012 (18)
UserName : *
UserName : 'magesfc'
WorkstationLen : 0x0012 (18)
WorkstationMaxLen : 0x0012 (18)
--
NTLMRevisionCurrent : NTLMSSP_REVISION_W2K3 (15)
[2022/11/08 12:38:18.462570, 3, pid=94611, effective(0, 0), real(0, 0)] ../auth/ntlmssp/ntlmssp_server.c:452(ntlmssp_server_preauth)
Got user=[magesfc] domain=[magesfc] workstation=[magesfc-ma] len1=24 len2=242
[2022/11/08 12:38:18.462593, 6, pid=94611, effective(0, 0), real(0, 0)] ../librpc/ndr/ndr_string.c:171(ndr_pull_string)
short string '', sent with NULL termination despite NOTERM flag in IDL
--
adding IPC service
[2022/11/08 12:38:18.464231, 5, pid=94611, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_util.c:117(make_user_info_map)
Mapping user [magesfc]\[magesfc] from workstation [magesfc-ma]
[2022/11/08 12:38:18.464269, 10, pid=94611, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_util.c:1563(is_trusted_domain)
wb_is_trusted_domain returned error: WBC_ERR_WINBIND_NOT_AVAILABLE
no entry for trusted domain magesfc found.
[2022/11/08 12:38:19.826023, 5, pid=94617, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:62(make_user_info)
attempting to make a user_info for magesfc (magesfc)
[2022/11/08 12:38:19.826038, 5, pid=94617, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:70(make_user_info)
making strings for magesfc's user_info struct
[2022/11/08 12:38:19.826054, 5, pid=94617, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:108(make_user_info)
making blobs for magesfc's user_info struct
[2022/11/08 12:38:19.826068, 10, pid=94617, effective(0, 0), real(0, 0), class=auth] ../source3/auth/user_info.c:159(make_user_info)
made a user_info for magesfc (magesfc)
[2022/11/08 12:38:19.826082, 3, pid=94617, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:178(auth_check_ntlm_password)
check_ntlm_password: Checking password for unmapped user [magesfc]\[magesfc]@[magesfc-ma] with the new password interface
[2022/11/08 12:38:19.826096, 3, pid=94617, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:181(auth_check_ntlm_password)
check_ntlm_password: mapped user is: [magesfc]\[magesfc]@[magesfc-ma]
[2022/11/08 12:38:19.826110, 10, pid=94617, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:190(auth_check_ntlm_password)
check_ntlm_password: auth_context challenge created by random
--
[0000] 67 B1 22 4D BE 8D FE 2A g."M...*
[2022/11/08 12:38:19.826173, 10, pid=94617, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_builtin.c:41(check_guest_security)
Check auth for: [magesfc]
[2022/11/08 12:38:19.826187, 10, pid=94617, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:233(auth_check_ntlm_password)
check_ntlm_password: guest had nothing to say
[2022/11/08 12:38:19.826201, 10, pid=94617, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_sam.c:75(auth_samstrict_auth)
Check auth for: [magesfc]
[2022/11/08 12:38:19.826215, 8, pid=94617, effective(0, 0), real(0, 0)] ../source3/lib/util.c:1206(is_myname)
is_myname("magesfc") returns 0
--
check_ntlm_password: sam had nothing to say
[2022/11/08 12:38:19.826256, 10, pid=94617, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_winbind.c:50(check_winbind_security)
Check auth for: [magesfc]
[2022/11/08 12:38:19.826270, 4, pid=94617, effective(0, 0), real(0, 0)] ../source3/smbd/sec_ctx.c:217(push_sec_ctx)
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
--
check_winbind_security: wbcAuthenticateUserEx failed: WBC_ERR_WINBIND_NOT_AVAILABLE
[2022/11/08 12:38:19.826399, 10, pid=94617, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_domain.c:280(check_ntdomain_security)
Check auth for: [magesfc]
[2022/11/08 12:38:19.826426, 5, pid=94617, effective(0, 0), real(0, 0)] ../source3/libads/sitename_cache.c:105(sitename_fetch)
sitename_fetch: Returning sitename for magesfc.COM: "Default-First-Site-Name"
--
size : 0x0012 (18)
string : *
string : 'magesfc'
workstation: struct lsa_String
length : 0x0016 (22)
--
result : NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:20.315477, 0, pid=94617, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth_domain.c:225(domain_client_validate)
domain_client_validate: unable to validate password for user magesfc in domain magesfc to Domain controller zzew.magesfc.COM. Error was NT_STATUS_ACCESS_DENIED.
[2022/11/08 12:38:20.344520, 5, pid=94617, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:252(auth_check_ntlm_password)
check_ntlm_password: winbind authentication for user [magesfc] FAILED with error NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:20.344563, 2, pid=94617, effective(0, 0), real(0, 0), class=auth] ../source3/auth/auth.c:315(auth_check_ntlm_password)
check_ntlm_password: Authentication for user [magesfc] -> [magesfc] FAILED with error NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:20.344581, 5, pid=94617, effective(0, 0), real(0, 0)] ../source3/auth/auth_ntlmssp.c:188(auth3_check_password)
Checking NTLMSSP password for magesfc\magesfc failed: NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:20.344597, 5, pid=94617, effective(0, 0), real(0, 0)] ../auth/ntlmssp/ntlmssp_server.c:737(ntlmssp_server_check_password)
../auth/ntlmssp/ntlmssp_server.c:737: Checking NTLMSSP password for magesfc\magesfc failed: NT_STATUS_ACCESS_DENIED
[2022/11/08 12:38:20.344614, 2, pid=94617, effective(0, 0), real(0, 0)] ../auth/gensec/spnego.c:716(gensec_spnego_server_negTokenTarg)
SPNEGO login failed: NT_STATUS_ACCESS_DENIED