LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   lock /home for other users? (https://www.linuxquestions.org/questions/linux-newbie-8/lock-home-for-other-users-354403/)

czon 08-17-2005 09:34 PM

lock /home for other users?
 
is there a way to lock all /home/ from other users? so one user cant see what the other user got in his /home? or do i have to "chmod" them all one by one?

jtshaw 08-17-2005 09:43 PM

chmod -R go-rwx /home

Translation: Remove read, write, and execute privlages recursively from all things in /home.

czon 08-17-2005 09:49 PM

Quote:

Originally posted by jtshaw
chmod -R go-rwx /home

Translation: Remove read, write, and execute privlages recursively from all things in /home.

but the user can still read/write/exe i hope? :P

jtshaw 08-17-2005 09:51 PM

The users (aka owner of the files) privlages will not be modified by that command.

czon 08-17-2005 09:54 PM

great ;) thx alot!

one more quicky ^^ if i add a new user after this.. do i have to do this chmod again or do this stay untill i (root) make a new chmod for /home?

czon 08-17-2005 10:01 PM

and no, i cant enter my own /home :( how do i undo this change?

jtshaw 08-17-2005 10:05 PM

The permissions a file gets created with are determined by the umask. This is usually set up in /etc/profile. Anyway, you can do man umask to check out exactly what it does, but if you set the umask as 077 it will accomplish what you ask.

jtshaw 08-17-2005 10:14 PM

cd to /home and type ls -la and post the results.

czon 08-17-2005 10:21 PM

i cant.. didnt let me start any programs at all. no terminal no nothing..
had to boot up my windows partition to keep contact with the forum.

what more do i have to do to make your "chmod -R go-rwx /home" work as i want? or... how do i undo this chmod?

jtshaw 08-17-2005 10:31 PM

Can you not log in as root?

czon 08-17-2005 10:33 PM

no i cant but i can enter consol from gdm, please just tell me how i make things as it was so i can move on

jtshaw 08-17-2005 10:39 PM

chmod -R 755 /home should be ok. Of course.. I have 5 systems setup with the first permissions I gave you so I'm not clear on why that didn't work for you.

czon 08-17-2005 10:41 PM

ok ill boot up debian and try.. post how it went in a few

czon 08-17-2005 10:49 PM

ok im back online with debian and everything is at is was ;) but the problem remains.. who do i lock others from enter my /home?

czon 08-17-2005 10:54 PM

ls -la in /home :

# ls -la
totalt 60
drwxr-xr-x 4 root staff 4096 2005-08-14 17:40 .
drwxr-xr-x 21 root root 4096 2005-08-14 19:01 ..
drwxr-xr-x 30 czon czon 4096 2005-08-18 05:46 czon
drwxr-xr-x 2 root root 49152 2005-08-14 19:35 lost+found

and after "chmod -R go-rwx /home"

# ls -la
totalt 60
drwx------ 4 root staff 4096 2005-08-14 17:40 .
drwxr-xr-x 21 root root 4096 2005-08-14 19:01 ..
drwx------ 30 czon czon 4096 2005-08-18 05:46 czon
drwx------ 2 root root 49152 2005-08-14 19:35 lost+found

now i cant start new programs again but i still got terminal open this time :D

BTW i run Debian Etch, kernel 2.6.12.4 if that helps


All times are GMT -5. The time now is 09:16 AM.