LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-18-2014, 09:34 PM   #1
HuMan-BiEnG
Member
 
Registered: Jun 2010
Posts: 92

Rep: Reputation: 15
Question procedures for mounting nfs3 ldap home directories using autofs on rhel6/centos6


Hello there,
i'm practicing on mounting ldap home directories within autofs
actually i have two virtual machines one as server & other as client
the server has ldap server with home directories exported within NFS3 but not properly configured !!
as i got this error when trying to mount ldap home directories :
Code:
[root@exam01 ldapusr01]# getent passwd ldapusr01
ldapusr01:*:600:600:ldapusr01 ldapusr01:/home/ldapusr01 :/bin/bash
[root@exam01 ldapusr01]# su - ldapusr01
su: warning: cannot change directory to /home/ldapusr01 : No such file or directory
id: cannot find name for group ID 600
-bash: [: /home/ldapusr01: binary operator expected
-bash-4.1$
i know that the problem with NFS on the server machine but unfortunately i dont have time for fixing this issue
anyway this prevents me from getting the right procedures for mounting ldap home directories within NFS3 !!
so, i just want someone to help me by confirming that i'm using the right procedures
i use the following practice :
Code:
Configure autofs requirement :
a. serv1.lab (192.168.3.1) NFS 3 – exports /rhome for ldapuser03
b. ldapuser03 home directory is serv1.lab:/rhome/ldapuser03
c. ldapuser03 home directory should be auto mounted locally beneath /rhome as /rhome/ldapuser03
d. home directories must be writable by their users
i will will solve this by the following procedures :
Code:
1) enable nfs 
yum -y install nfs-utils
2) check/install autofs
(rpm -qa | grep ^autofs) || yum -y install autofs
chkconfig autofs on
3) create automount entry
echo "/rhome   /etc/auto.ldap" >> /etc/auto.master
echo "ldapuser03  -fstype=nfs,nfsvers=3,rw,sync serv1.lab:/rhome/ldapuser03" > /etc/auto.ldap
4) restart autofs 
/etc/init.d/autofs stop && /etc/init.d/autofs start
5) confirm mounting ldap home directory
su - ldapuser03
because i have problems in configuring NFS on the server machine i didnt know wether i'm right or wrong
so please can anyone confirm the previous procedures ?
am i right using the options "-fstype=nfs,nfsvers=3" for mounting NFS 3 ?
any help will be appreciated,
please all accept my best regards,,

Last edited by HuMan-BiEnG; 07-18-2014 at 09:51 PM.
 
Old 07-19-2014, 09:03 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Code:
ldapusr01:*:600:600:ldapusr01 ldapusr01:/home/ldapusr01 :/bin/bash
What happens when you remove the space after /home/ldapusr01?
 
Old 07-19-2014, 09:04 AM   #3
HuMan-BiEnG
Member
 
Registered: Jun 2010
Posts: 92

Original Poster
Rep: Reputation: 15
Hello there,
any updates ??
i just want to confirm the steps required for mounting ldap home directories !!
any help will be appreciated,,
 
Old 07-19-2014, 09:06 AM   #4
HuMan-BiEnG
Member
 
Registered: Jun 2010
Posts: 92

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by AlucardZero View Post
Code:
ldapusr01:*:600:600:ldapusr01 ldapusr01:/home/ldapusr01 :/bin/bash
What happens when you remove the space after /home/ldapusr01?
Hello AlucardZero,
i will try now to update/fix this issue & give retry
hope this will work
 
Old 07-19-2014, 11:30 AM   #5
HuMan-BiEnG
Member
 
Registered: Jun 2010
Posts: 92

Original Poster
Rep: Reputation: 15
Unhappy

Quote:
Originally Posted by HuMan-BiEnG View Post
Hello AlucardZero,
i will try now to update/fix this issue & give retry
hope this will work
Hello AlucardZero,
i have reinstalled server machine & reconfigured nfs & ldap server
but still have the same problem , as shown :
Code:
[root@localhost ~]# getent passwd ldapusr01
ldapusr01:*:6000:6000:ldapusr01 ldapusr01:/home/ldapusr01:/bin/bash
[root@localhost ~]# su - ldapusr01
su: warning: cannot change directory to /home/ldapusr01: No such file or directory
id: cannot find name for group ID 6000
-bash-4.1$
the problem is with configuring "automount" option within ldap server which needs more time in order to get fixed
unfortunately i dont have more time for investigating ldap automount options
thanks man for your trying to help & i relly appreciate this so much
anyone please could confirm the solution/procedures for mounting ldap home directories !!!!
please all accept my best regards,,,
 
Old 07-19-2014, 11:43 AM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Code:
echo "/rhome   /etc/auto.ldap" >> /etc/auto.master
You are automounting the LDAP homedirs under /rhome, but your passwd information has /home/ldapusr01.

Change /home/ldapusr01 to /rhome/ldapusr01 and make sure /rhome directory is created on the client, OR change "/rhome /etc/auto.ldap" to "/home /etc/auto.ldap", make sure nothing else is mounted on /home, and restart autofs.
 
Old 07-20-2014, 03:27 AM   #7
HuMan-BiEnG
Member
 
Registered: Jun 2010
Posts: 92

Original Poster
Rep: Reputation: 15
Unhappy

Quote:
Originally Posted by AlucardZero View Post
Code:
echo "/rhome   /etc/auto.ldap" >> /etc/auto.master
You are automounting the LDAP homedirs under /rhome, but your passwd information has /home/ldapusr01.

Change /home/ldapusr01 to /rhome/ldapusr01 and make sure /rhome directory is created on the client, OR change "/rhome /etc/auto.ldap" to "/home /etc/auto.ldap", make sure nothing else is mounted on /home, and restart autofs.
Hello AlucardZero,
i have no time to retry again also am pretty sure that this problem could be fixed from ldap server
by configuring "automount" option !!
i just need to be sure from options for mounting ldap home directories within NFS v3 using autofs
are the following options are right for this :

Code:
ldapuser01      -fstype=nfs,nfsvers=3,rw   serv1.lab:/rhome/ldapuser01
just need to be sure from this options
can anyone here confirm these options !!
thanks again AlucardZero
please all accept my best regards,,

Last edited by HuMan-BiEnG; 07-20-2014 at 03:29 AM.
 
Old 07-20-2014, 02:02 PM   #8
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Sure. But you're still going to get "No such file or directory" until you fix the client as in my previous post.

It's like you're at 101 Independence Ave but then told your grandparents to meet you at 1600 Pennsylvania Ave. They're not going to find you.
 
Old 07-21-2014, 01:13 AM   #9
HuMan-BiEnG
Member
 
Registered: Jun 2010
Posts: 92

Original Poster
Rep: Reputation: 15
Cool

Quote:
Originally Posted by AlucardZero View Post
Sure. But you're still going to get "No such file or directory" until you fix the client as in my previous post.

It's like you're at 101 Independence Ave but then told your grandparents to meet you at 1600 Pennsylvania Ave. They're not going to find you.
Hello AlucardZero,
first thank you man for insisting to help me
& be sure man that mee too want to help myself
when investigating this problem i found that there is a "automount" option that should be configured within ldap ldif files
but i didnt configured & sure this is the root cause of the problem
i have reconfigured ldap server for home directories under "serv1.lab:/rhome/ldapusr0X"
then in the client machine i have configured it to mount ldap home directories under "/rhome/ldapusr0X"
as you asked for but this doesnt also solve the problem
this makes that the root cause in ldap automount configuration option as i told you before
thats why i was trying to make things easy by getting the right options for mounting nfs 3
anyway many thanks man for trying to help me
time is over & hope that i used the right options for mounting ldap nfs 3 home directories
please accept my best regards,,
 
Old 07-21-2014, 10:18 AM   #10
HuMan-BiEnG
Member
 
Registered: Jun 2010
Posts: 92

Original Poster
Rep: Reputation: 15
Talking

Hello there,
i just came from RHCSA exam now
& i get confirmed that steps are right & the problem was in configuring ldap server
many thanks for my dear friend Abd El Rahman for standing with me always when need any help
& thank you also AlucardZero for trying to help me
please all accept my best regards,,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LDAP not creating home directories vannathlab Linux - Server 2 12-25-2012 05:00 AM
[SOLVED] Need Autofs fix for RHEL6.3|Centos6.3 urgent rahilmaknojia Linux - Newbie 10 09-26-2012 02:12 PM
[SOLVED] ldap+nfs+autofs for centralized storage of home directories Blue_Ice Linux - Server 1 02-15-2010 09:21 AM
Need help:Configuring autofs to automount the home directories of NIS users. Savita Eli Linux - Server 4 08-27-2009 12:26 AM
autofs nfs mounting home directories question extendedping Linux - Networking 3 01-30-2008 04:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:02 PM.

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