Portál AbcLinuxu, 5. listopadu 2025 21:54
[global]
workgroup = MOJEDOMENA
security = ADS
realm = MOJEDOMENA.LAN
winbind refresh tickets = Yes
vfs objects = acl_xattr
map acl inherit = Yes
store dos attributes = Yes
dedicated keytab file = /etc/krb5.keytab
kerberos method = secrets and keytab
winbind use default domain = yes
log file = /var/log/samba/%m.log
log level = 5
# Default ID mapping configuration for local BUILTIN accounts
# and groups on a domain member. The default (*) domain:
# - must not overlap with any domain ID mapping configuration!
# - must use a read-write-enabled back end, such as tdb.
idmap config * : backend = tdb
idmap config * : range = 2000-9999
# - You must set a DOMAIN backend configuration
# idmap config for the SAMDOM domain
idmap config MOJEDOMENA : backend = rid
idmap config MOJEDOMENA : schema_mode = rfc2307
idmap config MOJEDOMENA : range = 1000000-9999999
# Template settings for login shell and home directory
template shell = /bin/bash
template homedir = /home/%U
username map = /usr/local/samba/etc/user.map
client signing = yes
client use spnego = yes
encrypt passwords = yes
winbind nss info = rfc2307
winbind trusted domains only = no
winbind use default domain = yes
winbind enum users = yes
winbind enum groups = yes
domain master = no
local master = no
[DATA]
comment = sdileny disk
path = /mnt/DATA
valid users = ****, administrator, *******
browseable = yes
read only = no
guest ok = yes
inherit acls = yes
inherit permissions = yes
Co se týče samotné samby, tak v jejím logu je tady toto:
Key: USER_****
[2020/12/17 16:23:22.688992, 4] ../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/12/17 16:23:22.689001, 3] ../source3/auth/check_samsec.c:399(check_sam_security)
check_sam_security: Couldn't find user '****' in passdb.
[2020/12/17 16:23:22.689011, 5] ../source3/auth/auth.c:251(auth_check_ntlm_password)
auth_check_ntlm_password: sam_ignoredomain authentication for user [****] FAILED with error NT_STATUS_NO_SUCH_USER, authoritative=1
[2020/12/17 16:23:22.689027, 2] ../source3/auth/auth.c:334(auth_check_ntlm_password)
check_ntlm_password: Authentication for user [****] -> [****] FAILED with error NT_STATUS_NO_SUCH_USER, authoritative=1
[2020/12/17 16:23:22.689047, 2] ../auth/auth_log.c:610(log_authentication_event_human_readable)
Auth: [SMB2,(null)] user [WIN10]\[****] at [Čt, 17 pro 2020 16:23:22.689039 CET] with [NTLMv2] status [NT_STATUS_NO_SUCH_USER] workstation [WIN10] remote host [ipv4:192.168.100.50:63554] mapped to [WIN10]\[****]. local host [ipv4:192.168.100.20:445]
{"timestamp": "2020-12-17T16:23:22.689116+0100", "type": "Authentication", "Authentication": {"version": {"major": 1, "minor": 0}, "status": "NT_STATUS_NO_SUCH_USER", "localAddress": "ipv4:192.168.100.20:445", "remoteAddress": "ipv4:192.168.100.50:63554", "serviceDescription": "SMB2", "authDescription": null, "clientDomain": "WIN10", "clientAccount": "****", "workstation": "WIN10", "becameAccount": null, "becameDomain": null, "becameSid": null, "mappedAccount": "****", "mappedDomain": "WIN10", "netlogonComputer": null, "netlogonTrustAccount": null, "netlogonNegotiateFlags": "0x00000000", "netlogonSecureChannelType": 0, "netlogonTrustAccountSid": null, "passwordType": "NTLMv2", "duration": 8925}}
[2020/12/17 16:23:22.689143, 5] ../source3/auth/auth_ntlmssp.c:196(auth3_check_password)
Checking NTLMSSP password for WIN10\**** failed: NT_STATUS_NO_SUCH_USER, authoritative=1
[2020/12/17 16:23:22.689153, 5] ../auth/ntlmssp/ntlmssp_server.c:386(ntlmssp_server_auth_send)
ntlmssp_server_auth_send: Checking NTLMSSP password for WIN10\**** failed: NT_STATUS_NO_SUCH_USER
[2020/12/17 16:23:22.689169, 4] ../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2020/12/17 16:23:22.689195, 5] ../auth/gensec/gensec.c:492(gensec_update_done)
gensec_update_done: ntlmssp[0x55e0667646f0]: NT_STATUS_NO_SUCH_USER
[2020/12/17 16:23:22.689206, 3] ../auth/gensec/spnego.c:1414(gensec_spnego_server_negTokenTarg_step)
gensec_spnego_server_negTokenTarg_step: SPNEGO(ntlmssp) login failed: NT_STATUS_NO_SUCH_USER
[2020/12/17 16:23:22.689216, 5] ../auth/gensec/gensec.c:492(gensec_update_done)
gensec_update_done: spnego[0x55e0667283e0]: NT_STATUS_NO_SUCH_USER
[2020/12/17 16:23:22.689227, 4] ../source3/smbd/sec_ctx.c:216(push_sec_ctx)
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2020/12/17 16:23:22.689235, 4] ../source3/smbd/uid.c:581(push_conn_ctx)
push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2020/12/17 16:23:22.689243, 4] ../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/12/17 16:23:22.689251, 5] ../libcli/security/security_token.c:53(security_token_debug)
Security token: (NULL)
[2020/12/17 16:23:22.689258, 5] ../source3/auth/token_util.c:866(debug_unix_user_token)
UNIX token of user 0
Primary group is 0 and contains 0 supplementary groups
[2020/12/17 16:23:22.689278, 4] ../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
Nenapadá někoho, kde by mohla být chyba?
[2020/12/19 18:45:52.114528, 5] ../libcli/security/security_token.c:63(security_token_debug)
Security token SIDs (13):
SID[ 0]: S-1-5-21-3350629017-2129866275-2833153760-1104
SID[ 1]: S-1-5-21-3350629017-2129866275-2833153760-513
SID[ 2]: S-1-1-0
SID[ 3]: S-1-5-2
SID[ 4]: S-1-5-11
SID[ 5]: S-1-5-32-545
SID[ 6]: S-1-22-1-1001104
SID[ 7]: S-1-22-2-10513
SID[ 8]: S-1-22-2-1001104
SID[ 9]: S-1-22-2-3003
SID[ 10]: S-1-22-2-3004
SID[ 11]: S-1-22-2-3006
SID[ 12]: S-1-22-2-3001
Privileges (0x 0):
Rights (0x 0):
[2020/12/19 18:45:52.114582, 5] ../source3/auth/token_util.c:866(debug_unix_user_token)
UNIX token of user 1001104
Primary group is 10513 and contains 6 supplementary groups
Group[ 0]: 1001104
Group[ 1]: 10513
Group[ 2]: 3003
Group[ 3]: 3004
Group[ 4]: 3006
Group[ 5]: 3001
[2020/12/19 18:45:52.114617, 4] ../source3/smbd/vfs.c:805(vfs_ChDir)
vfs_ChDir to /tmp
[2020/12/19 18:45:52.114634, 4] ../source3/smbd/vfs.c:859(vfs_ChDir)
vfs_ChDir got /tmp
[2020/12/19 18:45:52.114646, 5] ../source3/smbd/uid.c:305(print_impersonation_info)
print_impersonation_info: Impersonated user: uid=(1001104,1001104), gid=(0,10513), cwd=[/tmp]
[2020/12/19 18:45:52.114661, 5] ../lib/dbwrap/dbwrap.c:130(dbwrap_lock_order_lock)
dbwrap_lock_order_lock: check lock order 1 for /var/run/samba/smbXsrv_session_global.tdb
[2020/12/19 18:45:52.114689, 5] ../lib/dbwrap/dbwrap.c:159(dbwrap_lock_order_unlock)
dbwrap_lock_order_unlock: release lock order 1 for /var/run/samba/smbXsrv_session_global.tdb
[2020/12/19 18:45:52.114700, 5] ../lib/dbwrap/dbwrap.c:130(dbwrap_lock_order_lock)
dbwrap_lock_order_lock: check lock order 1 for /var/run/samba/smbXsrv_tcon_global.tdb
[2020/12/19 18:45:52.114711, 5] ../lib/dbwrap/dbwrap.c:159(dbwrap_lock_order_unlock)
dbwrap_lock_order_unlock: release lock order 1 for /var/run/samba/smbXsrv_tcon_global.tdb
[2020/12/19 18:45:52.114728, 3] ../source3/smbd/msdfs.c:1063(get_referred_path)
get_referred_path: |DATA| in dfs path \data\DATA is not a dfs root.
[2020/12/19 18:45:52.114739, 3] ../source3/smbd/smb2_server.c:3195(smbd_smb2_request_error_ex)
smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_NOT_FOUND] || at ../source3/smbd/smb2_ioctl.c:312
[2020/12/19 18:45:52.117274, 4] ../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
setting sec ctx (1001104, 10513) - sec_ctx_stack_ndx = 0
Neměl by někdo odkaz, jak nějak snadno nastavit users, skupiny a share?
Zkus v sekci
[global]
nastavit
security = user
V
/etc/samba/smb.conf
user [WIN10]\[****]Zkuste do toho přihlašovacího dialogu ve windows jako jméno uživatele zadat místo "Pepa" "MOJEDOMENA\Pepa"
winbind use default domain = yestak nebude potřeba vypisovat doménu, jde to nějak vyřešit tak, aby se doplňoval jehom ten login a ne login a včetně domény?
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.