How to make schema changes in containerized NSDC

NethServer Version: 7

After updating nethserver samba does not add the objectClass posixAccount anymore. In my case this is needed. I have the LDIF file ready to make the changes but I don’t see how I can access the LDAP server within the container. Can someone give me some hints how I can connect to the LDAP server?

I need something like this:
ldapmodify -f ./5-posix.ldif -H ‘ldap://localhost:389’ -I

But inside the container is no ldapmodify and from outside I can not connect. Even with the IP address of the container. More ideas?

1 Like

Hi and welcome to NethServer Community,

you may need to install ldapmodify depending on your distro:

Debian: apt install ldap-utils
Rocky/Alma: dnf install openldap-clients

Get the LDAP IP/Port/Bind DN and password from the UI:

I used ldapsearch but ldapmodify should work too:

ldapsearch -H ldap://10.5.4.1:20017 -D cn=ldapservice,dc=domain,dc=tld -W

`

1 Like

Anything useful to your request from these?

1 Like

Hi Markus. I already have the tools on NethServer. My problem is that I don’t get inside the container with it. I have the “Local Samba 4 Active Directory Domain Controller” as described here: Users and groups — NethServer 7 Final

So your answer is not that helpful. But thanks.

1 Like

Thanks… I didn’t know about the tool “ldbmodify”. With this tool I could resolve my problem.

For those who want to know how exactly:

First you connect to the container with
# systemd-run -M nsdc -t /bin/bash

and then you run
# dbmodify -U username -H 'ldap://localhost:389' changes.ldif

1 Like

Haha, I was completely wrong. For Samba and NS7 you may also have a look at the wiki: howto:useful_commands [NethServer Wiki]

3 Likes

Yes, this is a lot more helpful. Thanks. This is what I was searching for all the time.

1 Like