LinuxQuestions.org
Review your favorite Linux distribution.
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 05-16-2009, 07:28 PM   #1
shanecaldeiro
LQ Newbie
 
Registered: May 2009
Posts: 24

Rep: Reputation: 15
changing root directory of a user


do to change the root directory of a user
 
Old 05-16-2009, 07:58 PM   #2
cheezy86
LQ Newbie
 
Registered: May 2009
Posts: 4

Rep: Reputation: 0
do you mean swicthing directory?
to do that just type: cd /directory/ you want switch to or cd.. or if u mean changing user, type su user-name it should work.
 
Old 05-16-2009, 09:00 PM   #3
MrChilly0
Member
 
Registered: Jan 2007
Location: midwest USA
Distribution: gentoo w/ funtoo overlay
Posts: 146

Rep: Reputation: 23
Can you be more specific? It's not real clear what you are trying to do. Are you wanting to use a different folder instead of /home/username?
 
Old 05-16-2009, 09:17 PM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
To change the root directory you use chroot. If that's truly what you meant, which I am not sure.
 
Old 05-16-2009, 09:49 PM   #5
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,281

Rep: Reputation: 126Reputation: 126
Quote:
Originally Posted by shanecaldeiro View Post
do to change the root directory of a user
Can you give a clear reason why you want to use something other than "/home/userid" for a user's home directory?
 
Old 05-16-2009, 10:08 PM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware®
Posts: 12,616
Blog Entries: 26

Rep: Reputation: 1988Reputation: 1988Reputation: 1988Reputation: 1988Reputation: 1988Reputation: 1988Reputation: 1988Reputation: 1988Reputation: 1988Reputation: 1988Reputation: 1988
Hi,

Quote:
Originally Posted by shanecaldeiro View Post
do to change the root directory of a user
You should look at 'How to Ask Questions the Smart Way' to get the response you expect. As you can see the lack of information will get you varied replies.
 
Old 05-18-2009, 11:54 AM   #7
shanecaldeiro
LQ Newbie
 
Registered: May 2009
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by onebuck View Post
Hi,



You should look at 'How to Ask Questions the Smart Way' to get the response you expect. As you can see the lack of information will get you varied replies.
how is the chroot command used to change directory of the user
 
Old 05-18-2009, 01:17 PM   #8
tuxtroll
LQ Newbie
 
Registered: May 2009
Posts: 11
Blog Entries: 1

Rep: Reputation: 0
you can change it in /etc/passwd file.

eg.
fake:x:1002:1002:,,,,:/home/fake:/bin/bash

fake:x:1002:1002:,,,,:<change_this>:/bin/bash
 
Old 05-18-2009, 01:26 PM   #9
shanecaldeiro
LQ Newbie
 
Registered: May 2009
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by tuxtroll View Post
you can change it in /etc/passwd file.

eg.
fake:x:1002:1002:,,,,:/home/fake:/bin/bash

fake:x:1002:1002:,,,,:<change_this>:/bin/bash
I have already done this but i am not quite satisfied. Actually i need two users to use same directory e.g. /home/default by many other users but the users cant find the /home/default directory because they are login are different. Is this logical?
 
Old 05-19-2009, 12:09 AM   #10
tuxtroll
LQ Newbie
 
Registered: May 2009
Posts: 11
Blog Entries: 1

Rep: Reputation: 0
I have already done this but i am not quite satisfied. Actually i need two users to use same directory e.g. /home/default by many other users but the users cant find the /home/default directory because they are login are different. Is this logical?

>>>>Check that both users have rwx permissions to access the directory that you intend to use as home. then it should not be a problem!
 
Old 05-19-2009, 12:30 AM   #11
mwkemo
Member
 
Registered: May 2009
Location: Croatia
Distribution: Debian
Posts: 31

Rep: Reputation: 16
I think it's smarter to group this two users and give permissions to folders that this two useres will use.
 
  


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
restrict a FTP user from changing directory qrshat Solaris / OpenSolaris 5 02-11-2009 04:02 AM
kde user directory changing overpencil Linux - Software 3 03-10-2008 12:39 AM
Changing apache's directory root triley Linux - Software 1 01-25-2006 03:21 PM
changing user, root, password! itz2000 Linux - Newbie 3 11-19-2005 03:31 AM
changing to root user without command line kaega2 Linux - Software 3 11-28-2003 03:14 PM


All times are GMT -5. The time now is 12:28 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration