LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 08-20-2007, 02:12 AM   #1
manoj.linux
Member
 
Registered: Aug 2007
Posts: 284

Rep: Reputation: 17
Question changing home directory


Hi,

I want to change the home directory of user when he login ,

For Example

After user A login he should be in /home/userb/test like that.
 
Old 08-20-2007, 02:15 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you can define a home directory with the -d option for useradd
 
Old 08-20-2007, 02:57 AM   #3
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Don't you actually mean that you want the user's default directory (Konqueror, Nautilus, shell) to be ~/test, instead of changing the very value of ~?

Yves.
 
Old 08-21-2007, 08:44 AM   #4
yanik
Member
 
Registered: Oct 2003
Location: Montreal Beach
Distribution: Debian Unstable
Posts: 368

Rep: Reputation: 30
that's a simple 'man usermod'....

Code:
usermod -d new_dir userA
if you want to move his home instead of creating a new one:

Code:
usermod -d new_dir -m userA
 
  


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
changing home directory peaceslp Linux - General 1 12-09-2005 07:13 AM
Home directory permissions changing haphazardly... zupidupi Linux - Newbie 4 04-14-2005 01:31 PM
Changing user's home directory? HOW barton Debian 10 04-04-2005 02:27 AM
Changing the home directory kyleinc Linux - General 2 02-26-2005 11:54 PM
changing home directory netboy_541 Linux - General 5 09-10-2003 04:09 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

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