I'm trying to create a member server (Join existing AD domain), and an error comes up...
Domain setup (this might take a while): binddn for user Administrator not found.
Here is my join.log:
Mon Mar 20 13:33:39 CDT 2017: starting /usr/share/univention-join/univention-join -dcaccount Administrator -dcpwd /tmp/tmp.rg9BZSPNM4
running version check
OK: UCS version on dc1.erlphase.com is higher or equal (4.14) to the local version (4.14).
Mon Mar 20 13:33:47 CDT 2017: finish /usr/share/univention-join/univention-join
Mon Mar 20 14:56:54 CDT 2017: starting /usr/share/univention-join/univention-join -dcaccount Administrator -dcpwd /tmp/tmp.xAU5s8IvrX
running version check
OK: UCS version on dc1.erlphase.com is higher or equal (4.14) to the local version (4.14).
Mon Mar 20 14:56:59 CDT 2017: finish /usr/share/univention-join/univention-join
Mon Mar 20 15:01:23 CDT 2017: starting /usr/share/univention-join/univention-join -dcaccount Administrator -dcpwd /tmp/tmp.nzOXNgHl80
running version check
OK: UCS version on dc1.erlphase.com is higher or equal (4.14) to the local version (4.14).
Mon Mar 20 15:01:28 CDT 2017: finish /usr/share/univention-join/univention-join
I have two existing Univention Servers. One is acting as an AD Server and hosts email. The second is a member server and is used as a fileserver. The new server is configured (hardware) the same as the fileserver: 2 CPU and 1GB RAM.
The currently running UCS servers are at 4.1-4 errata406, and the one I'm installing is from an ISO file downloaded 4 days ago. Windows version doesn't matter, as a Windows box is not involved in this scenario.
I want another member server to use for testing Apps (in this case DokuWiki).
Steps to reproduce: 1. Install UCS on virtual machine - specifiy IP address 2. When asked, join an Active Directory Domain as member server 3. wait for install to complete.
The following error comes up:
join.log:
Wed Mar 22 12:41:15 CDT 2017: starting /usr/sbin/univention-join -dcname dc1.erlphase.com -dcaccount Administrator -dcpwd /tmp/tmpNmMHYz
running version check
OK: UCS version on dc1.erlphase.com is higher or equal (4.14) to the local version (4.14).
Wed Mar 22 12:41:25 CDT 2017: finish /usr/sbin/univention-join
If it's all UCS systems, then pick "Join existing UCS domain" instead. "Join an existing Active Directory domain" is actually for existing Windows Active Directory domains. I'm sorry that this isn't more obvious. Here is the corresponding chapter in the manual.
I think we just have to test this step by step. My idea is to not attempt the join during installation, but afterwards. This way we can execute the join in verbose-mode and the join.log will contain much more information.
Start the installation, choose your dc1 as primary DNS server and when the Domain setup page appears, choose Join into an existing UCS domain:
On the next page, choose Memberserver:
When asked for the join information, deselect the check mark at Start join at the end of the installation:
Choose a hostname and a password for the local root user:
Deselect the check mark at Update system after setup:
Click on Configure system, wait for the installation to finish, reboot
Login to your newly installed system via ssh and the local root user with the password you have chosen above
Start the join in verbose mode: univention-join -verbose
Edit and attach the logfile /var/log/univention/join.log
Please note: Why edit the file? The verbose mode will also log the password of your domain administrator to the logfile. Make sure to replace this with a dummy value in the logfile before uploading it. You should find entries like these in the first 25 lines or so:
The system tries to receive the binddn of the Administrator via logging in to dc1 as Administrator and running udm there. But that fails, binddn is empty and therefore the join can't continue.
Can you please test this on the newly installed memberserver:
Write the password of the Administrator to a file: echo -n "fake!" > pwdfile
run a little variation of the command used in the join process: univention-ssh pwdfile Administrator@dc1.erlphase.com \ /usr/sbin/udm users/user list --filter uid=Administrator \ --logfile /dev/null | sed -ne 's|^DN: ||p
if this returns nothing, run the command again without ... | sed -ne 's|^DN: ||p
if this returns nothing, run this command on your dc1: /usr/sbin/udm users/user list --filter uid=Administrator
This gave me a '>' prompt and wouldn't run. I had to ^C, so I dropped the sed.
root@app1:~# univention-ssh pwdfile Administrator@dc1.erlphase.com /usr/sbin/udm users/user list --filter uid=Administrator --logfile /dev/null
Traceback (most recent call last):
File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 222, in doit
output = univention.admincli.admin.doit(arglist)
File "/usr/lib/pymodules/python2.7/univention/admincli/admin.py", line 404, in doit
out = _doit(arglist)
File "/usr/lib/pymodules/python2.7/univention/admincli/admin.py", line 608, in _doit
univention.admin.modules.init(lo, position, module)
File "/usr/lib/pymodules/python2.7/univention/admin/modules.py", line 135, in init
update_extended_attributes(lo, module, position)
File "/usr/lib/pymodules/python2.7/univention/admin/modules.py", line 297, in update_extended_attributes
propertyHook = getattr(univention.admin.hook, propertyHookString)()
File "/usr/lib/pymodules/python2.7/univention/admin/hooks.d/oxUserDefaults.py", line 59, in __init__
lo, pos = univention.admin.uldap.getMachineConnection()
File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 147, in getMachineConnection
lo = univention.uldap.getMachineConnection(start_tls, decode_ignorelist=decode_ignorelist, ldap_master=ldap_master)
File "/usr/lib/pymodules/python2.7/univention/uldap.py", line 79, in getMachineConnection
bindpw = open(secret_file).read().rstrip('\n')
IOError: [Errno 13] Permission denied: '/etc/machine.secret'
root@app1:~#
Echoing the password into a file fails. My real password contains an exclamation mark, and I get this:
> echo -n “fake!” > pwdfile
-bash: !": event not found
So I used nano to create the pwdfile.
root@dc1:~# univention-ssh pwdfile Administrator@dc1.erlphase.com /usr/sbin/udm users/user list --filter uid=Administrator --logfile /dev/null
Warning: Permanently added ‘dc1.erlphase.com,192.168.100.5’ (ECDSA) to the list of known hosts.
Traceback (most recent call last):
File “/usr/share/univention-directory-manager-tools/univention-cli-server”, line 222, in doit
output = univention.admincli.admin.doit(arglist)
File “/usr/lib/pymodules/python2.7/univention/admincli/admin.py”, line 404, in doit
out = _doit(arglist)
File “/usr/lib/pymodules/python2.7/univention/admincli/admin.py”, line 608, in _doit
univention.admin.modules.init(lo, position, module)
File “/usr/lib/pymodules/python2.7/univention/admin/modules.py”, line 135, in init
update_extended_attributes(lo, module, position)
File “/usr/lib/pymodules/python2.7/univention/admin/modules.py”, line 297, in update_extended_attributes
propertyHook = getattr(univention.admin.hook, propertyHookString)()
File “/usr/lib/pymodules/python2.7/univention/admin/hooks.d/oxUserDefaults.py”, line 59, in init
lo, pos = univention.admin.uldap.getMachineConnection()
File “/usr/lib/pymodules/python2.7/univention/admin/uldap.py”, line 147, in getMachineConnection
lo = univention.uldap.getMachineConnection(start_tls, decode_ignorelist=decode_ignorelist, ldap_master=ldap_master)
File “/usr/lib/pymodules/python2.7/univention/uldap.py”, line 79, in getMachineConnection
bindpw = open(secret_file).read().rstrip(’\n’)
IOError: [Errno 13] Permission denied: ‘/etc/machine.secret’
root@dc1:~# su Administrator
Administrator@dc1:/root$ /usr/sbin/udm users/user list --filter uid=Administrator
Traceback (most recent call last):
File “/usr/share/univention-directory-manager-tools/univention-cli-server”, line 222, in doit
output = univention.admincli.admin.doit(arglist)
File “/usr/lib/pymodules/python2.7/univention/admincli/admin.py”, line 404, in doit
out = _doit(arglist)
File “/usr/lib/pymodules/python2.7/univention/admincli/admin.py”, line 608, in _doit
univention.admin.modules.init(lo, position, module)
File “/usr/lib/pymodules/python2.7/univention/admin/modules.py”, line 135, in init
update_extended_attributes(lo, module, position)
File “/usr/lib/pymodules/python2.7/univention/admin/modules.py”, line 297, in update_extended_attributes
propertyHook = getattr(univention.admin.hook, propertyHookString)()
File “/usr/lib/pymodules/python2.7/univention/admin/hooks.d/oxUserDefaults.py”, line 59, in init
lo, pos = univention.admin.uldap.getMachineConnection()
File “/usr/lib/pymodules/python2.7/univention/admin/uldap.py”, line 147, in getMachineConnection
lo = univention.uldap.getMachineConnection(start_tls, decode_ignorelist=decode_ignorelist, ldap_master=ldap_master)
File “/usr/lib/pymodules/python2.7/univention/uldap.py”, line 79, in getMachineConnection
bindpw = open(secret_file).read().rstrip(’\n’)
IOError: [Errno 13] Permission denied: ‘/etc/machine.secret’
I changed the password to contain no special characters and tried all of the above again. No difference.
yeah, sorry. ! is a builtin command of bash - I forgot about that. The correct way is to use single quotes instead of doube quotes, so the ecxlamation mark doesn't get interpreted as shell command. So this should work:
echo -n ‘fake!’ > pwdfile
The remark of @stoeckigt is also valid. Texteditors like nano tend to add line terminators or newline characters at the end of lines in text files. Those special characters might be interpreted as part of the password - which they aren't. That's also why I used echo -n instead of echo. The -n prevents a trailing newline.
As @stoeckigt pointed out, you can use the file command to check the file. If it says "with no line terminators", the file is okay. If that output is missing, the line terminators must be removed.
But back to the original problem: After checking back with my colleagues, it seems that using /etc/machine.secret is only a fallback mechanism. The first try is to use /etc/ldap.secret and there we need the correct permissions, too.
This is how it looks on my system:
root@ucs01:~# ls -la /etc/ldap.secret
-rw-r----- 1 root DC Backup Hosts 8 Apr 29 2013 /etc/ldap.secret
Note that the group "DC Backup Hosts" has read permissions. And by default, the user Administrator is part of the group "DC Backup Hosts".
So please check that your permissions are the same and that your Administrator account is part of the group "DC Backup Hosts".