LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-29-2009, 06:16 AM   #1
Roxxor2
LQ Newbie
 
Registered: Mar 2006
Posts: 23

Rep: Reputation: 15
How change a userīs home directory?


How can I change a userīs home dir?

Letīs say Roxxor2īs home dit is /home/Roxxor2, how can I change it to /home/roxxor?
 
Old 08-29-2009, 06:22 AM   #2
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
make sure the new directory is owned by the right uid with:

chown -R roxxor2:roxxor2 /home/roxxor #run as root

then edit /etc/passwd and change the line beginning with roxxor2. change the part that says '/home/roxxor2' to '/home/roxxor'
 
Old 08-29-2009, 06:28 AM   #3
Roxxor2
LQ Newbie
 
Registered: Mar 2006
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks! Is it also possible to change the userīs name from "Roxxor2" to "roxxor"?
 
Old 08-29-2009, 06:32 AM   #4
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
Yup. same place in /etc/passwd, just change the name.

I think it might be a bit more complicated for some GUI settings, but that's it for the basic login.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Active Directory User Cannot Write to Samba Home Directory jonwatson Linux - Networking 2 12-19-2006 12:40 PM
change user home directory from command line cccc Debian 1 03-23-2006 05:07 PM
Change HOME directory? bhuwan Linux - Newbie 7 01-30-2006 09:19 AM
how to change a user's Home directory n1wil Linux - General 8 08-24-2002 03:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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