LinuxQuestions.org
Visit Jeremy's Blog.
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 07-09-2013, 07:57 AM   #1
gauravgoel1989
LQ Newbie
 
Registered: Feb 2013
Posts: 25

Rep: Reputation: Disabled
NIS Client error: Could not chdir to home directory /home/chacha: No such file or dir


I have configured an NIS server on RHEL6 Virtual machine. However when trying to login in client machine, I am getting the below error. Could anyone help me out with the solution and reason?


login as: chacha
chacha@20.198.242.178's password:
Last login: Thu Jul 4 15:38:58 2013 from 20.198.242.167
Could not chdir to home directory /home/chacha: No such file or directory
-bash-4.1$ pwd
/
-bash-4.1$ whoami
chacha
-bash-4.1$ who am i
chacha pts/2 2013-07-09 18:22 (20.198.242.167)
-bash-4.1$
 
Old 07-09-2013, 08:45 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,200

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
Quote:
Originally Posted by gauravgoel1989 View Post
I have configured an NIS server on RHEL6 Virtual machine. However when trying to login in client machine, I am getting the below error. Could anyone help me out with the solution and reason?

login as: chacha
chacha@20.198.242.178's password:
Last login: Thu Jul 4 15:38:58 2013 from 20.198.242.167
Could not chdir to home directory /home/chacha: No such file or directory
-bash-4.1$ pwd /
-bash-4.1$ whoami chacha
You POSTED the reason: the home directory for that user doesn't exist, and the system is TELLING YOU THAT, when it says "/home/chacha: No such file or directory".

The solution is to create the missing home directory, and assign it to that user.
 
Old 07-10-2013, 02:22 AM   #3
gauravgoel1989
LQ Newbie
 
Registered: Feb 2013
Posts: 25

Original Poster
Rep: Reputation: Disabled
I understand that but since it is an NIS client machine, it should automatically create the home directory for user. For example if you are a normal user then before logging into an NIS client machine you can't create your own home directory. And being a system administrator you can't create every user's (on NIS server) home directory on hundreds of client machines.

Last edited by gauravgoel1989; 07-10-2013 at 02:28 AM.
 
Old 07-10-2013, 10:03 AM   #4
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,200

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
Quote:
Originally Posted by gauravgoel1989 View Post
I understand that but since it is an NIS client machine, it should automatically create the home directory for user. For example if you are a normal user then before logging into an NIS client machine you can't create your own home directory. And being a system administrator you can't create every user's (on NIS server) home directory on hundreds of client machines.
...except as the administrator, you have to create the users...they don't create themselves, and as part of that, you create the home directory. And if you didn't configure automount correctly, it WON'T create the home directories on the shared resource. If you're not using a shared resource, then you have no choice but to create the directories manually on each client. You don't say how you have it set up.

Do you have NFS up and running wherever you want your shares to be? Have you set up auto.master correctly?
 
Old 07-11-2013, 03:49 AM   #5
gauravgoel1989
LQ Newbie
 
Registered: Feb 2013
Posts: 25

Original Poster
Rep: Reputation: Disabled
Now I am getting the "Access Denied" error on NIS Client machine when trying to login.

login as: ggoel4
ggoel4@20.198.242.178's password:
Access denied
ggoel4@20.198.242.178's password:
Access denied
ggoel4@20.198.242.178's password

However the user is present on NIS server.

[root@RHEL6VM ~]# grep -i ggoel4 /etc/passwd
ggoel4:x:500:500:Gaurav Goel:/home/ggoel4:/bin/bash
[root@RHEL6VM ~]#
 
Old 07-11-2013, 08:24 AM   #6
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,200

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
Quote:
Originally Posted by gauravgoel1989 View Post
Now I am getting the "Access Denied" error on NIS Client machine when trying to login.

login as: ggoel4
ggoel4@20.198.242.178's password:
Access denied

However the user is present on NIS server.

[root@RHEL6VM ~]# grep -i ggoel4 /etc/passwd
ggoel4:x:500:500:Gaurav Goel:/home/ggoel4:/bin/bash
[root@RHEL6VM ~]#
Well, the only thing we can tell you is that something isn't configured correctly.

Since you haven't answered the questions posted previously about NFS/shared resources, how you have it set up, info from the log file(s), etc., there's nothing we can help you with. Posting additional questions with no further information tells us nothing. Since you're using RHEL6, I suggest you call Red Hat support, since you're PAYING for RHEL...right????
 
Old 08-09-2013, 12:24 PM   #7
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 268
Blog Entries: 7

Rep: Reputation: 18
Hi,

run ypcat passwd in client machine and check whether it is listting the server NIS users.

You need to share your users home directory in the nis server.So make sure NFS runs properly.

In the client side please check the automout configurations.

NIS client does not automatically create home directories when user logs in.you need to aceess the home directory from the server,where the user had been created.

Last edited by dinakumar12; 08-09-2013 at 12:27 PM.
 
Old 08-09-2013, 01:38 PM   #8
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,200

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
Quote:
Originally Posted by dinakumar12 View Post
Hi,
run ypcat passwd in client machine and check whether it is listting the server NIS users.
You need to share your users home directory in the nis server.So make sure NFS runs properly.
In the client side please check the automout configurations.
NIS client does not automatically create home directories when user logs in.you need to aceess the home directory from the server,where the user had been created.
Right...that's what I told the OP previously.
 
Old 09-20-2013, 04:42 PM   #9
warrenweiss
LQ Newbie
 
Registered: Feb 2001
Location: Denver, CO
Distribution: RedHat, Caldera, SuSe
Posts: 7

Rep: Reputation: 0
Auto-Creating Home Directories on Client Servers

If NIS cannot create home directories on client machines, then why does documentation describe that capability?

One can (in theory) append the following line to the /etc/pam.d/system-auth-ac file:

session optional pam_mkhomedir.so skel=/etc/skel umask=077

Admittedly, I can't get it to work, either, but I've never seen a reference to a requirement that home directories be NFS- (or otherwise) mounted.
 
  


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
[SOLVED] 'Could not chdir to home directory /home/[user]: Permission denied' arashi256 Linux - Newbie 25 11-11-2011 09:29 AM
alternate home directory on NIS client. Cerephim Linux - Server 4 12-07-2010 02:26 AM
NFS problem: "Could not chdir to home directory /home/USER: Permission denied" sumanc Linux - Server 4 07-22-2010 04:12 PM
auto mount to nfs home dir when user login to nis client lijianatusa Linux - Newbie 4 02-25-2009 11:38 PM
nis client login - user home dir not fnd synfield Linux - Networking 0 03-27-2003 03:51 AM


All times are GMT -5. The time now is 08:47 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration