LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-27-2021, 03:11 PM   #1
Imtiaz Deen
LQ Newbie
 
Registered: Jul 2005
Location: FL, USA
Distribution: CentOS
Posts: 8

Rep: Reputation: 0
After domain change Could not chdir to home directory


I am getting this error "Could not chdir to home directory /home/user: No such file or directory" after unjoin domain using sssd and rejoining using samba-winbind
 
Old 04-27-2021, 03:19 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by Imtiaz Deen View Post
I am getting this error "Could not chdir to home directory /home/user: No such file or directory" after unjoin domain using sssd and rejoining using samba-winbind
Ok; so based on what you posted, what do you think we can tell you? You don't tell us anything about your system, how its configured, version/distro of Linux, what you did (and are TRYING to do), etc.

Short answer: rejoin the domain
Longer answer: provide actual details, read the "Question Guidelines" link in my posting signature, and we can try to help you.
 
Old 04-27-2021, 03:34 PM   #3
Imtiaz Deen
LQ Newbie
 
Registered: Jul 2005
Location: FL, USA
Distribution: CentOS
Posts: 8

Original Poster
Rep: Reputation: 0
Sorry for not sharing expected details.

I am using CentOS Linux release 7.8.2003 (Core)


smb.conf:

[global]
workgroup = DEV
realm = DEV.DEEN.LOCAL
security = ads
idmap config * : range = 16777216-33554431
template homedir = /home/%U
template shell = /bin/bash
kerberos method = secrets and keytab
winbind use default domain = true
winbind offline logon = false

#--authconfig--end-line--

log file = /var/log/samba/log.%m
idmap config * : rangesize = 1000000
load printers = no
;idmap config * : range = 1000000-19999999
passdb backend = tdbsam
netbios name = DEVDEENV01
cups options = raw
server string = VXSP TDH DB SERVER 2
idmap config * : backend = autorid
encrypt passwords = yes
os level = 20
max log size = 50


SSH output:

login as: deen\user1
Using keyboard-interactive authentication.
Password:
Last login: Tue Apr 27 12:42:54 2021 from 10.80.200.20
Could not chdir to home directory /home/user1: No such file or directory
-bash-4.2$
 
Old 04-27-2021, 05:07 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by Imtiaz Deen View Post
Sorry for not sharing expected details. I am using CentOS Linux release 7.8.2003 (Core)
smb.conf:
Code:
[global]
   workgroup = DEV
   realm = DEV.DEEN.LOCAL
   security = ads
   idmap config * : range = 16777216-33554431
   template homedir = /home/%U
   template shell = /bin/bash
   kerberos method = secrets and keytab
   winbind use default domain = true
   winbind offline logon = false

#--authconfig--end-line--

        log file = /var/log/samba/log.%m
        idmap config * : rangesize = 1000000
        load printers = no
        ;idmap config * : range = 1000000-19999999
        passdb backend = tdbsam
        netbios name = DEVDEENV01
        cups options = raw
        server string = VXSP TDH DB SERVER 2
        idmap config * : backend = autorid
        encrypt passwords = yes
        os level = 20
        max log size = 50
SSH output:
Code:
login as: deen\user1
Using keyboard-interactive authentication.
Password:
Last login: Tue Apr 27 12:42:54 2021 from 10.80.200.20
Could not chdir to home directory /home/user1: No such file or directory
-bash-4.2$
Again, you're still not providing relevant information, such as WHY you disconnected from the AD server, what you're trying to do, or what you did/have done so far.

Who configured Samba and Active Directory? Because you may want to ask them for assistance...did you look at what you posted? Have you checked the Samba log files? Because based on what you posted, your home directory is on an active directory server....very obviously, if you're not CONNECTED to the server, you can't map a drive, can you?
 
Old 04-29-2021, 02:49 PM   #5
Imtiaz Deen
LQ Newbie
 
Registered: Jul 2005
Location: FL, USA
Distribution: CentOS
Posts: 8

Original Poster
Rep: Reputation: 0
I am able to resolve this issue by using following commands.


cp -R /etc/skel/ /home/user1

cd /home/user1/skel

ls -lah

cp .* ../

cd ..

rm -rf skel/

chown -R "deen\user1"."deen\user1" /home/user1

ls -lah (you should see output like below)

total 24K
drwxr-xr-x 2 deen\user1 deen\user1 4.0K Apr 28 12:56 .
drwxr-xr-x. 44 root root 4.0K Apr 28 12:49 ..
-rw-r--r-- 1 deen\user1 deen\user1 18 Apr 28 12:55 .bash_logout
-rw-r--r-- 1 deen\user1 deen\user1 193 Apr 28 12:55 .bash_profile
-rw-r--r-- 1 deen\user1 deen\user1 344 Apr 28 12:55 .bashrc
-rw-r--r-- 1 deen\user1 deen\user1 172 Apr 28 12:55 .kshrc


SSH output

login as: deen\user1
Using keyboard-interactive authentication.
Password:
Last login: Tue Apr 28 15:36:48 2021 from 10.X.X.X

deen\user1 @ DEVDEENV01 | ~
-->
 
Old 04-30-2021, 09:07 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by Imtiaz Deen View Post
I am able to resolve this issue by using following commands.
Code:
cp -R /etc/skel/ /home/user1
cd /home/user1/skel
ls -lah
cp .* ../
cd ..
rm -rf skel/
chown -R "deen\user1"."deen\user1" /home/user1
ls -lah (you should see output like below)

total 24K
drwxr-xr-x   2 deen\user1 deen\user1 4.0K Apr 28 12:56 .
drwxr-xr-x. 44 root          root    4.0K Apr 28 12:49 ..
-rw-r--r--   1 deen\user1 deen\user1   18 Apr 28 12:55 .bash_logout
-rw-r--r--   1 deen\user1 deen\user1  193 Apr 28 12:55 .bash_profile
-rw-r--r--   1 deen\user1 deen\user1  344 Apr 28 12:55 .bashrc
-rw-r--r--   1 deen\user1 deen\user1  172 Apr 28 12:55 .kshrc
SSH output
Code:
login as: deen\user1
Using keyboard-interactive authentication.
Password:
Last login: Tue Apr 28 15:36:48 2021 from 10.X.X.X

deen\user1 @ DEVDEENV01 | ~
So you CREATED the directory you didn't have, but that certainly DOES NOT solve the issue. None of the other files (or users) are going to have their data either.

You still haven't said what you are/were trying to accomplish by disconnecting from the AD, but all you did was create yourself a home directory. Yes, that will make the missing directory message go away, but you don't have ANY other data.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not chdir to home directory /home/portssh.com-agus9329:no such file or directory Agus9329 Linux - Server 1 04-14-2018 02:45 PM
Login Error- Could not chdir to home directory /home/UserID: No such file or directory abhi_jais Linux - Newbie 1 03-24-2018 12:01 PM
[SOLVED] NIS Client error: Could not chdir to home directory /home/chacha: No such file or dir gauravgoel1989 Linux - Server 8 09-20-2013 04:42 PM
[SOLVED] 'Could not chdir to home directory /home/[user]: Permission denied' arashi256 Linux - Newbie 25 11-11-2011 09:29 AM
NFS problem: "Could not chdir to home directory /home/USER: Permission denied" sumanc Linux - Server 4 07-22-2010 04:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:27 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