LinuxQuestions.org
Help answer threads with 0 replies.
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 06-24-2009, 05:57 PM   #1
zion_rulz
LQ Newbie
 
Registered: May 2009
Location: India
Distribution: kubuntu-8.04.2
Posts: 12

Rep: Reputation: 0
How to change home path for a user?


Hi

I have a created a particular user 'wscale' and I want it's home path to be set to /home/xxx/yyy

Not sure if the below works

HOME=/home/xxx/yyy

Any help will be much appreciated.

Cheers!
 
Old 06-24-2009, 06:01 PM   #2
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 611

Rep: Reputation: 221Reputation: 221Reputation: 221
As root, open the file /etc/passwd

You will see a line that looks like this:
Code:
wscale:x:1000:100:,,,:/home/wscale:/bin/bash
Change it to this:
Code:
wscale:x:1000:100:,,,:/home/xxx/yyy:/bin/bash
Make sure you have done this:
Code:
# mkdir /home/xxx/yyy
# chown wscale /home/xxx/yyy
 
Old 06-24-2009, 06:09 PM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Also check out the manpages for usermod(8).
 
Old 06-24-2009, 06:09 PM   #4
viento
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Rep: Reputation: 1
OR, if you want to save all troubles of editing the passwd file and directories:

useradd -d /home/xxx/wscale wscale

but you still need to make sure that /home/xxx is available...
 
Old 06-24-2009, 06:21 PM   #5
zion_rulz
LQ Newbie
 
Registered: May 2009
Location: India
Distribution: kubuntu-8.04.2
Posts: 12

Original Poster
Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by foodown View Post
As root, open the file /etc/passwd

You will see a line that looks like this:
Code:
wscale:x:1000:100:,,,:/home/wscale:/bin/bash
Change it to this:
Code:
wscale:x:1000:100:,,,:/home/xxx/yyy:/bin/bash
Make sure you have done this:
Code:
# mkdir /home/xxx/yyy
# chown wscale /home/xxx/yyy


I just followed your steps and VOILA!!! Thanks a ton.

Cheers!
 
  


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
set up java_home path in /home/user/.bashrc but use path in /usr/lib/java vitalstrike82 Slackware 4 01-13-2009 11:25 PM
How could I change my /home dir path? morphynoman Linux - Newbie 14 12-04-2008 02:00 PM
change path of ftp user bkcreddy17 Linux - Networking 3 05-23-2008 01:56 AM
How to change the user home & other paths like trash can Four Linux - Newbie 6 05-13-2006 12:09 PM
change user home directory from command line cccc Debian 1 03-23-2006 05:07 PM

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

All times are GMT -5. The time now is 12:54 AM.

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