I am experimenting with Samba as active directory controller in my home network for the last two weeks.
I installed samba on ubuntu server 22.04 following a couple of guides and videos, but this page covers it for most of it. I am able to join computers to the domain, both windows and linux. I can list the joined computers using samba-tool computer list
.
I created users and groups successfully using the samba tool. From windows clients I can login using these accounts.
From linux (ubuntu 23.04 and 23.10) I can join the domain following official ubuntu docs, but I am unable to login.
bp@bas-hp:samba (master) % sudo login
bas-hp login: [email protected]
Password:
Login incorrect
bas-hp login: [email protected]
Password:
Login incorrect
I am able to create a kerberos ticket
bp@bas-hp:samba (master) % klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: [email protected]
Valid starting Expires Service principal
16-04-24 22:26:57 17-04-24 08:26:57 krbtgt/[email protected]
renew until 17-04-24 22:26:53
The results of my trying the Testing section in the document I'm following seem to start well:
bp@legion-ubuntu:~ % getent passwd [email protected]
[email protected]:*:1494001108:1494000513:Bas Prins:/home/[email protected]:/bin/bash
bp@legion-ubuntu:~ % getent passwd [email protected]
[email protected]:*:1494001104:1494000513:bp:/home/[email protected]:/bin/bash
But when I issue the groups
command I do see some concerning result
bp@legion-ubuntu:~ % groups [email protected]
[email protected] : domain [email protected] denied rodc password replication [email protected] [email protected] enterprise [email protected] domain [email protected]
bp@legion-ubuntu:~ % groups [email protected]
[email protected] : domain [email protected] denied rodc password replication [email protected] [email protected] enterprise [email protected] domain [email protected]
I am googling in parallel when "denied rodc password replication" means and if/how I need to fix that.
Full sssd.conf
[sssd]
domains = sb.lan
config_file_version = 2
services = nss, pam
[domain/sb.lan]
default_shell = /bin/bash
krb5_store_password_if_offline = True
cache_credentials = True
krb5_realm = SB.LAN
realmd_tags = manages-system joined-with-adcli
id_provider = ad
fallback_homedir = /home/%u@%d
ad_domain = sb.lan
use_fully_qualified_names = True
ldap_id_mapping = True
access_provider = ad
timeout = 20
ldap_uri = ldap://dc.sb.lan
ldap_search_base = dc=sb,dc=lan
auth_provider = krb5
krb5_server = dc.sb.lan
krb5_passwd = dc.sb.lan
krb5_validate = True
I am hoping that somebody with more knowledge on samba/AD can give me some pointers how best to troubleshoot this issue. Are there tools I can use to drill down to the root cause?
Update 2
After adding the following line in sssd.conf on ubuntu client computer
ad_gpo_access_control = permissive
I can finally login through command line sudo login
. But, unfortunately, after a successful login it tries to download policies I think, which fails.
Last login: Wed Apr 17 14:15:01 CEST 2024 on pts/2
Applying machine settings
ERROR Error from server: error while updating policy: can't get policies for "legion-ubuntu": failed to retrieve the list of GPO (exited with 1): exit status 1
Failed to bind - LDAP client internal error: NT_STATUS_INVALID_PARAMETER
Failed to connect to 'ldap://dc.sb.lan' with backend 'ldap': LDAP client internal error: NT_STATUS_INVALID_PARAMETER
Failed to open session: (1, 'LDAP client internal error: NT_STATUS_INVALID_PARAMETER')
Failure setting user credentials
I am troubleshooting this in parallel, of course hoping for a carry where somebody just tells me what to fix where ;-). If I manage to figure this out by myself I will update the question.
getent passwd
is good. And yourgroups
is good too - it's just that there's a group nameddenied rodc password replication group
that is possibly confusing the output/var/log
for reasons why you can't log in with[email protected]
. You seem to have two similar domain accounts,[email protected]
and[email protected]
- are you sure you're using the correct password when testing?ad_gpo_access_control = permissive
in sssd.conf which solves that problem. Now I am stuck with the next error.... haha. Victory must be sweet some day.... I will update the question, hoping this is the last hurdle....