LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 07-21-2008, 09:15 PM   #1
afzalmasood
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?

thanks
 
Old 07-21-2008, 09:26 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,527

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

--------------------
Steve Stites
 
Old 07-22-2008, 08:41 AM   #3
afzalmasood
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.

Thanks
 
Old 07-22-2008, 08:52 AM   #4
odcheck
Member
 
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
Code:
mv name correctname (ENTER)
 
Old 07-22-2008, 08:56 AM   #5
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,675

Rep: Reputation: 122Reputation: 122
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:
Code:
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:
Code:
mv afzal masood
The cd command changes the working directory to /home. Check if the dir is renamed properly with
Code:
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
Code:
reboot
Let it boot normally.
 
Old 07-22-2008, 10:31 AM   #6
afzalmasood
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.
 
  


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
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


All times are GMT -5. The time now is 05:04 PM.

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