Post-installation failed "Unknown 'admin' user" and "Unable to regenerate the configuration for service(s): ssl"

Continued from this ticket : https://dev.yunohost.org/issues/370

after reinstalling a clean Debian system and running the YunoHost post-install, i get this error:

Success! LDAP successfully initialized
Error: Unknown ‘admin’ user
Error: Unable to regenerate the configuration for service(s): ssl
Failure !
The following error was caught during YunoHost installation :

Post-installation failed

Installation logs are located in /var/log/yunohost-installation.log

The log output of yunohost-cli.log is:

2016-06-04 23:48:49,602 INFO moulinette.actionsmap process - processing action [24392.1]: yunohost.tools.postinstall
2016-06-04 23:48:49,603 INFO yunohost.tools tools_postinstall - [24392.1] Installing YunoHost…
2016-06-04 23:48:49,668 SUCCESS yunohost.tools success - [24392.1] LDAP successfully initialized
2016-06-04 23:48:49,693 ERROR yunohost.hook hook_callback - [24392.1] Unknown ‘admin’ user
Traceback (most recent call last):
File “/usr/lib/moulinette/yunohost/hook.py”, line 279, in hook_callback
path=path, args=args)
File “/usr/lib/moulinette/yunohost/service.py”, line 321, in _pre_call
filesystem.mkdir(service_pending_path, 0755, True, uid=‘admin’)
File “/usr/lib/python2.7/dist-packages/moulinette/utils/filesystem.py”, line 48, in mkdir
chown(path, uid, gid)
File “/usr/lib/python2.7/dist-packages/moulinette/utils/filesystem.py”, line 69, in chown
m18n.g(‘unknown_user’, user=uid))
MoulinetteError: [Errno 22] Unknown ‘admin’ user
2016-06-04 23:48:49,695 ERROR yunohost cli - Unable to regenerate the configuration for service(s): ssl

I am not seeing anything important in yunohost-installation.log

Hello,

I encountered the same issue, made many re-installation and don’t remember all well but it seems that this problem occurs with debian jessie and not with debian jessie lite … have’nt dig more to know why

++
b

hi,
thanks but i am not using raspberry pi. i use pc.
anyway i tried to install it now with fresh debain CD 8.5.0, not with 8.4.0 dvd version as in the beginning. and i got the same error. it worth mention that i use encrypt lvm.

please help me.

Exact same problem here… upon fresh Debian 8 install , using script

at the second postinstall try :slight_smile:

`root@yunobian:/home/jordi# yunohost tools postinstall
Main domain: jordila.nohost.me
New administration password:
Confirm new administration password:
Success! LDAP successfully initialized
Error: Unknown ‘admin’ user
Error: Unable to regenerate the configuration for service(s): ssl
root@yunobian:/home/jordi#

`

what am i missing ?

Hello,
I face the same problem with recent Debian distribs both on Raspberry PI 3 (Raspbian) and Debian 64 bits (Stable)
After a lot of analysis, the problems seems to be due to a missing “admin” user entry in the LDAP database.
This missing entry is for sudo schema.

I don’t understand why this entry is not created.
I’ve checked my slapd.conf file which includes the /etc/ldap/schema/sudo.schema.

When looking at /var/log/yunohost/yunohost-cli.log, i’ve found the following error:

2016-08-06 03:14:08,032 INFO yunohost.tools tools_postinstall - [27578.1] Installation de YunoHost…
2016-08-06 03:14:08,111 ERROR moulinette.authenticator.ldap add - error during LDAP add operation with: rdn=‘cn=admin,ou=sudo’, attr_dict={‘cn’: ‘admin’, ‘sudoCommand’: ‘ALL’, ‘sudoUser’: ‘admin’, ‘objectClass’: [‘sudoRole’, ‘top’], ‘sudoOption’: ‘!authenticate’, ‘sudoHost’: ‘ALL’}
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/moulinette/authenticators/ldap.py”, line 140, in add
self.con.add_s(dn, ldif)
File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 195, in add_s
return self.result(msgid,all=1,timeout=self.timeout)
File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 458, in result
resp_type, resp_data, resp_msgid = self.result2(msgid,all,timeout)
File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 462, in result2
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all,timeout)
File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 469, in result3
resp_ctrl_classes=resp_ctrl_classes
File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 476, in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
File “/usr/lib/python2.7/dist-packages/ldap/ldapobject.py”, line 99, in _ldap_call
result = func(*args,kwargs)
UNDEFINED_TYPE: {‘info’: ‘sudoCommand: attribute type undefined’, ‘desc’: ‘Undefined attribute type’}

2016-08-06 03:14:08,122 SUCCESS yunohost.tools success - [27578.1] L’annuaire LDAP a été initialisé
2016-08-06 03:14:08,172 ERROR yunohost.hook hook_callback - [27578.1] Utilisateur « admin » inconnu
Traceback (most recent call last):
File “/usr/lib/moulinette/yunohost/hook.py”, line 279, in hook_callback
path=path, args=args)
File “/usr/lib/moulinette/yunohost/service.py”, line 321, in _pre_call
filesystem.mkdir(service_pending_path, 0755, True, uid=‘admin’)
File “/usr/lib/python2.7/dist-packages/moulinette/utils/filesystem.py”, line 48, in mkdir
chown(path, uid, gid)
File “/usr/lib/python2.7/dist-packages/moulinette/utils/filesystem.py”, line 69, in chown
m18n.g(‘unknown_user’, user=uid))
MoulinetteError: [Errno 22] Utilisateur « admin » inconnu
2016-08-06 03:14:08,175 ERROR yunohost cli - Impossible de régénérer la configuration pour les services : ssl

It seems that “sudoCommand” attribute is undefined in the LDAP.
I don’t understand why and i’ve not enough knowledge in ldap to solve this issue.

Any clue will be helpfull.

thanks to you.

I add a user in the debian system that i named “admin”. And then the postinstall work !

thanks bouba for your trick, but it’s not really an explanation of the issue:
On a standard yunohost installation, it’s not necessary to create this admin account in order to install the system properly (and this account is not created by yunohost).
That means that something went wrong during the installation.
And the most probable reason is related to the LDAP as i have already explained: the issue seems to be related to the trace “UNDEFINED_TYPE: {‘info’: ‘sudoCommand: attribute type undefined’, ‘desc’: ‘Undefined attribute type’}**”.

It would be nice to understand why and find a way to correct it.

Thank you.