I have configured an installation of ocis 4.0.2 with ldap against Active Directory. I used this configuration LDAP - Active Directory | ownCloud and it works. (se below) The only thing I needed to change was setting:
OCIS_LDAP_USER_ENABLED_ATTRIBUTE=Enabled
because otherwise it tried to use an attribute ownCloudUserEnabled which the university’s Active Directory don’t have and that didn’t work.
However I have had no luck setting OCIS_ADMIN_USER_ID to a working value: I tried the objectGuid I got from AD running:
get-aduser johan
DistinguishedName : CN=johan,OU=employee,OU=People,DC=test,DC=com
Name : johan
ObjectClass : user
ObjectGUID : b5e9db1d-ea73-4bc8-9aa3-77da8ad12b72
OCIS_ADMIN_USER_ID="b5e9db1d-ea73-4bc8-9aa3-77da8ad12b72"
But it didn’t work. On the page OCIS with Samba LDAP without Owncloud schema? - #18 by cloud72 they discuss using a page GUID Converter - Tool Slick to convert the guid. So I tried this too:
OCIS_ADMIN_USER_ID="1ddbe9b573eac84b9aa377da8ad12b72"
Didn’t work. I tried only the username and the distinguised name from AD but they didn’t work either
OCIS_ADMIN_USER_ID="johan"
OCIS_ADMIN_USER_ID="CN=johan,OU=employee,OU=People,DC=test,DC=com"
I have also logged with debug but haven’t found anything. I tried to set another users in OCIS_ADMIN_USER_ID but I couldn’t find any reference to this user in log. Either username or GUID
Currently I’m out of ideas on how to proceed and hope you can help me
Steps to reproduce
- Set up ocis as stated above
- Login using the account
Expected behaviour
The user should have administrative menus
Actual behaviour
The user is only logged in as an ordinary user
Server configuration
Operating system: ubuntu 22.04 LTS
Web server: nginx/1.18.0 (Ubuntu)
ownCloud version: ocis 4.0.2
Updated from an older ownCloud or fresh install: fresh install
Where did you install ownCloud from: Downloaded it from homepage
LDAP configuration inside the /etc/ocis/ocis.env file
OCIS_URL=https://ocis.test.com
PROXY_HTTP_ADDR=0.0.0.0:9200
PROXY_TLS=false
OCIS_INSECURE=false
# OCIS_LOG_LEVEL=warn
OCIS_LOG_LEVEL=warn
OCIS_LOG_FILE=/var/lib/ocis/ocis.log
OCIS_CONFIG_DIR=/etc/ocis
OCIS_BASE_DATA_PATH=/var/lib/ocis
OCIS_LDAP_URI=ldap://ad.test.com:389
OCIS_LDAP_INSECURE="true"
OCIS_LDAP_BIND_DN="CN=ocis,OU=Service Accounts,DC=test,DC=com"
OCIS_LDAP_BIND_PASSWORD="xxxxxxxx"
OCIS_LDAP_DISABLE_USER_MECHANISM="none"
OCIS_LDAP_GROUP_BASE_DN="DC=test,DC=com"
OCIS_LDAP_GROUP_OBJECTCLASS="group"
OCIS_LDAP_GROUP_SCHEMA_ID="objectGUID"
OCIS_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING="true"
OCIS_LDAP_GROUP_SCHEMA_GROUPNAME="cn"
OCIS_LDAP_USER_BASE_DN="DC=test,DC=com"
OCIS_LDAP_USER_OBJECTCLASS="user"
OCIS_LDAP_USER_SCHEMA_ID="objectGUID"
OCIS_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING="true"
OCIS_LDAP_USER_SCHEMA_USERNAME="sAMAccountName"
OCIS_LDAP_LOGIN_ATTRIBUTES="sAMAccountName"
IDP_LDAP_LOGIN_ATTRIBUTE="sAMAccountName"
IDP_LDAP_UUID_ATTRIBUTE="objectGUID"
IDP_LDAP_UUID_ATTRIBUTE_TYPE=binary
GRAPH_LDAP_SERVER_WRITE_ENABLED="false"
OCIS_EXCLUDE_RUN_SERVICES=idm
OCIS_LDAP_USER_ENABLED_ATTRIBUTE=Enabled
# The values I tested but got none to work
# OCIS_ADMIN_USER_ID="b5e9db1d-ea73-4bc8-9aa3-77da8ad12b72"
# OCIS_ADMIN_USER_ID="1ddbe9b573eac84b9aa377da8ad12b72"
# OCIS_ADMIN_USER_ID=johan
# OCIS_ADMIN_USER_ID="CN=johan,OU=employee,OU=People,DC=test,DC=com"