LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   changing root directory of a user (https://www.linuxquestions.org/questions/linux-newbie-8/changing-root-directory-of-a-user-726488/)

shanecaldeiro 05-16-2009 07:28 PM

changing root directory of a user
 
do to change the root directory of a user

cheezy86 05-16-2009 07:58 PM

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.

MrChilly0 05-16-2009 09:00 PM

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?

i92guboj 05-16-2009 09:17 PM

To change the root directory you use chroot. If that's truly what you meant, which I am not sure.

Quakeboy02 05-16-2009 09:49 PM

Quote:

Originally Posted by shanecaldeiro (Post 3543228)
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?

onebuck 05-16-2009 10:08 PM

Hi,

Quote:

Originally Posted by shanecaldeiro (Post 3543228)
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.

shanecaldeiro 05-18-2009 11:54 AM

Quote:

Originally Posted by onebuck (Post 3543307)
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

tuxtroll 05-18-2009 01:17 PM

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

shanecaldeiro 05-18-2009 01:26 PM

Quote:

Originally Posted by tuxtroll (Post 3544905)
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?

tuxtroll 05-19-2009 12:09 AM

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!

mwkemo 05-19-2009 12:30 AM

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


All times are GMT -5. The time now is 03:49 PM.