2

I am experimenting with an OpenLDAP-Server and I'm not sure how to add /home directories for users. Also where are the files stored?

If a user creates a file on a Windows machine in the domain, where will it be stored? I suppose on the server but in which directory.

How do I create folders for users so that they can access them from any machine in the domain?

I know these might be simple questions but I hope someone still has the passion to answer them.

1

I am experimenting with an OpenLDAP-Server and I'm not sure how to add /home directories for users. Also where are the files stored?

When you connect a Linux client (or server for that matter) directly to an OpenLDAP-server the default behavior is to use the 'homeDirectory'-attribute for each user read from your OpenLDAP-server.

However, this home directory one specificies inside the LDAP database would be a local path on your (Linux) client's computer.

One can of course mount this local path to a remote directory residing on your server using whatever protocol works best.

Small detail or hint: I do not know if Firefox works with Samba/CIFS-shares though. It did not work for me but using the NFS-protocol for mounting home directories did however work for me.

Of course one would not want to configure each client after install to be connected to your OpenLDAP-server manually. One could automate this using perhaps an 'unattended answer' file (actually when using Debian they are called 'preseeds').

For Windows though, you would use Samba for your roaming profiles.

If a user creates a file on a Windows machine in the domain, where will it be stored? I suppose on the server but in which directory.

If you want a Windows machine to join a domain you will first have to set up a domain. Just installing and configuring an OpenLDAP-server will not get you a domain.

However, if you want your OpenLDAP-server to contain users for your domain, you could setup a Samba-server which you would then configure to get its users from your OpenLDAP-server. You would specifiy an LDAP-URI as the 'passdb backend' inside your Samba configuration file.

Samba 3.6 has been End-of-Life for a certain amount of time but you can just use a Samba 4.x. Although the latter Samba-versions have an Active Directory-mode one can still use just your own OpenLDAP-server, if you want to.

How do I create folders for users so that they can access them from any machine in the domain?

For Windows one can use a login script to map the proper shares to the proper drive letters. One can base this on group membership for example.

One can use phpLDAPadmin to manage LDAP-users and all other things inside LDAP. It is quite configurable.

Personally though, if it is just about managing users and groups inside LDAP I have a preference for LDAP-account-manager (which is also a web-based LDAP-managing tool) because my opinion is it is quite user-friendly (at least for basic management of users and groups).

It is free for some basic management of users and groups inside LDAP. If you want more features though you will have to pay.

0

The easy way to set an openldap server is to search samba openldap domain howto on google,there's a lot of docs,mosts out of date,but with a little study you can adapt to your case. You will learn that exist a nice php program called phpldapadmin and you can add easy the homedir via web interface

enter image description here

If you not interested or not need samba or not use windows client,you can easily setup an ldap server,there's a lot of docs on google,search for "openldap migration tools" "openldap phpldapadmin". Some years ago i have set a ldap server using openldap

1)Convert local user to ldap,with migration tools
2)Setup a ldap server,search for openldap ignite or openldap init
3)Setup authentication using pam-ldap module,search on google for info
4)Using phpldapadmin to easy manage server
0

I answered this same question on another thread here:

Edit home directory for an LDAP user in Linux

However I'll answer it here as well...

I know this thread is old. However, I stumbled across it while attempting the same thing on CentOS 7. I imagine the process is the same. I needed to change several users directories from /home/USER to /home/ldap-users/USER.

First create an ldif file with the changes you want to make. I named mine changehomedirs.ldif. You may need to change your ou depending on what organizational unit you put your users in. I called mine People.

Then I wrote a script to essentially loop through each LDAP user one at a time and used sed to replace the word USER in the changehomedirs.ldif file to the current user in the loop and redirect the output to a temporary file named tmp.ldif.

Then I used the ldapmodify command to make the changes by using the -f option to read the desired changes from the tmp.ldif file. The example is in the screenshot below.

This is just a testing system so the password is not sensitive in nature.

Home dirs before LDAP modification

How to change a users home directory in LDAP

Home dirs after LDAP modification

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.