LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-11-2011, 01:53 AM   #1
jnreddy
Member
 
Registered: May 2008
Location: INDIA
Distribution: RHEL
Posts: 171

Rep: Reputation: 15
LDAP server Vs Client


Hi Friends and Gurus,

I configured openLdap in RHEL5 on virtual achines,everything is working fine, I created a user called ldapuser,in LDAP server and i created a home directory for ldapuser in my LDAP client, now i can able to login to the both Server and client with ldapuser account....

Now here what am expecting is i want to export my server's home directory to the client, i dont want to create home directories manually in the client machine, i googled about that, and it can be done through autofs.....

Can any one please guide me....what need to be done on the client and server side.

any help is appreciated

Thanks In Advance
JNReddy
 
Old 06-11-2011, 02:47 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well what you're asking for is nothing whatsoever to do with LDAP. You need to appreciate what things are and are not related. A users home directory is defined in their user information, and that is totally abstracted from the source of that information. Basically you just need to set up a standard NFS server and mount the exported /home on each appropriate client. You can use mechanisms like automount to improve this but a single entry in /etc/fstab is usually fine.
 
Old 06-11-2011, 11:26 AM   #3
Blue_Ice
Member
 
Registered: Jul 2006
Location: Belgium
Distribution: Debian, Fedora, CentOS, Windows
Posts: 361

Rep: Reputation: Disabled
@acid_kewpie: It can be done with LDAP and autofs, but you are right you need to setup a NFS server for this.

For this you need an ldif that looks like this:
Code:
dn: nisMapName=auto.master,dc=example,dc=com
objectClass: top
objectClass: nisMap
nisMapName: auto.master

dn: cn=/home,nisMapName=auto.master,dc=example,dc=com
objectClass: nisObject
cn: /home
nisMapEntry: ldap:yourldapserver.example.com:nisMapName=auto.home,dc=example,dc=com
nisMapName: auto.master

dn: nisMapName=auto.home,dc=example,dc=com
objectClass: top
objectClass: nisMap
nisMapName: auto.home

dn: cn=/,nisMapName=auto.home,dc=example,dc=com
objectClass: nisObject
cn: /
nisMapEntry: -fstype=nfs yourfileserver.example.com:/path/to/your/nfs/share/&
nisMapName: auto.home
Of course you need to configure the autofs to connect to ldap as well. Unfortunately, I don't have this configuration file at hand now. However if I remember correctly, this is pretty straight forward. When autofs is configured to connect to the ldap server, the provided ldap entries will replace auto.master and auto.home files on your client.

Edit: In the last ldap entry, you shouldn't forget the / at the end of the path of the nisMapEntry property. You might also need to change something in the nsswitch.conf file. But I need to look that up as well.

Last edited by Blue_Ice; 06-11-2011 at 11:29 AM.
 
1 members found this post helpful.
Old 06-11-2011, 12:40 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
For what has been asked I think the above is massive overkill. It's very complete and good in general, but if you are *only* using autofs for /home then it's not justified in reality, and is more confusing than useful. For the first iteration at least, uttelry ignore ldap in relation to this query. Just start and end with setting up a simple NFS export.
 
1 members found this post helpful.
Old 06-12-2011, 12:16 AM   #5
Blue_Ice
Member
 
Registered: Jul 2006
Location: Belgium
Distribution: Debian, Fedora, CentOS, Windows
Posts: 361

Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
For what has been asked I think the above is massive overkill. It's very complete and good in general, but if you are *only* using autofs for /home then it's not justified in reality, and is more confusing than useful. For the first iteration at least, uttelry ignore ldap in relation to this query. Just start and end with setting up a simple NFS export.
That really depends on how many clients you have to maintain and how you want to maintain it. What the OP is trying to accomplish is what is called roaming profiles in Windows. The advantage that you have is that you can configure the /home at one location. When you need to change something this is easily done at that location. The real issue with this setup is that when the NFS stops working or is not yet available nobody can access their files and settings on /home, but that is the case with any solution involving storing the /home on a remote server.
You could be right that this is not justified, but in my personal opinion there is not enough information from the OP to tell if this is the case. Besides it can be overkill now, but maybe it is good planning ahead to do so anyway.
 
Old 06-12-2011, 02:11 AM   #6
jnreddy
Member
 
Registered: May 2008
Location: INDIA
Distribution: RHEL
Posts: 171

Original Poster
Rep: Reputation: 15
Smile Thanks a Lot

Thanks Acid Kewpie and Blue ICE,

Agree both of you, I go with Blue ICE but again i confused about server and Client bcoz am not into much with LDAP.can you please specify what lines i have to insert from your output. what i understood is i need nfs to export the /home, and autofs to map the /home in cliet am i correct, please correct me if i am wrong...

Server side
1) auto.master
2) auto.misc

Client
1) auto.master
2) anto.misc


Thanks a Lot..n...LOL
JNReddy
 
Old 06-12-2011, 11:56 AM   #7
Blue_Ice
Member
 
Registered: Jul 2006
Location: Belgium
Distribution: Debian, Fedora, CentOS, Windows
Posts: 361

Rep: Reputation: Disabled
Server side:
- LDAP server
- provided LDIF loaded into LDAP server
- Configured NFS

Client side:
- LDAP client
- Autofs

auto.master and auto.misc are replaced by the entries on the LDAP server.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] openldap client fails to connect ldap server 'ldap_bind: Can't contact LDAP server' JALITE Linux - Server 12 09-30-2010 08:17 AM
ldap server/client issues murra1a Linux - Server 2 02-01-2010 07:40 AM
root mismatch between server and client in LDAP kosterbang Linux - General 3 01-28-2010 10:00 AM
how to setup open ldap server and solaris 10 as ldap client maheshlad Linux - Software 1 10-10-2009 12:55 AM
request for ldap server/client configuration soumalya Linux - Server 1 01-29-2008 07:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration