Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 07-21-2008, 09:15 PM   #1
LQ Newbie
Registered: Jul 2008
Posts: 4

Rep: Reputation: 0
debian user home directory

Hi everyone,

I just installed debian today and I mistakenly changed the home directory of the only user to something that is incorrect. Now when I try to logon to that user it doesn't let me log on. Can someone please tell me how to fix this problem?

Old 07-21-2008, 09:26 PM   #2
LQ Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,863

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
Login as root and change the directory name back to what it should be.

Steve Stites
Old 07-22-2008, 08:41 AM   #3
LQ Newbie
Registered: Jul 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you very much for taking the time to answer my question. Is it possible that you could give me a little more detail as I am a newbie. If you dont mind could you please tell me how to login as root and what command to enter to change the directory name.

Old 07-22-2008, 08:52 AM   #4
Registered: Aug 2006
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 978

Rep: Reputation: 30
At the gdm/kdm/xdm login screen press CTRL+ALT+F1 then you'll be on a terminal.
Login as root

cd to the home dir's and perform a
mv name correctname (ENTER)
Old 07-22-2008, 08:56 AM   #5
Dutch Master
Senior Member
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
OK, (re)boot your system and select 'single user mode'. When asked for the root password, enter it. You're now on the commandline. Don't be afraid, we'll help you out Next, issue this command:
cd /home
mv <old-name-of-dir> <new-name-of-dir>
Example: if you named it afzal and you want it named masood, issue this command:
mv afzal masood
The cd command changes the working directory to /home. Check if the dir is renamed properly with
ls /home
You can ommit the /home suffix of that command if you're in the /home dir. When all is right, reboot your system with
Let it boot normally.
Old 07-22-2008, 10:31 AM   #6
LQ Newbie
Registered: Jul 2008
Posts: 4

Original Poster
Rep: Reputation: 0
user home directory

Thanks guys, I couldn't have done it without your help.


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
NFS problem: "Could not chdir to home directory /home/USER: Permission denied" sumanc Linux - Server 4 07-22-2010 04:12 PM
how to get current user home directory George2 Programming 3 05-06-2007 01:31 PM
Active Directory User Cannot Write to Samba Home Directory jonwatson Linux - Networking 2 12-19-2006 12:40 PM
jail user to /home/user directory confused_user Linux - Security 12 03-15-2006 09:56 AM > Forums > Linux Forums > Linux - Distributions > Debian

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

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