LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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

Closed Thread
 
Search this Thread
Old 08-17-2005, 10:34 PM   #1
czon
Member
 
Registered: Aug 2005
Posts: 39

Rep: Reputation: 15
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?
 
Old 08-17-2005, 10:43 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
chmod -R go-rwx /home

Translation: Remove read, write, and execute privlages recursively from all things in /home.
 
Old 08-17-2005, 10:49 PM   #3
czon
Member
 
Registered: Aug 2005
Posts: 39

Original Poster
Rep: Reputation: 15
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
 
Old 08-17-2005, 10:51 PM   #4
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
The users (aka owner of the files) privlages will not be modified by that command.
 
Old 08-17-2005, 10:54 PM   #5
czon
Member
 
Registered: Aug 2005
Posts: 39

Original Poster
Rep: Reputation: 15
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?
 
Old 08-17-2005, 11:01 PM   #6
czon
Member
 
Registered: Aug 2005
Posts: 39

Original Poster
Rep: Reputation: 15
and no, i cant enter my own /home how do i undo this change?
 
Old 08-17-2005, 11:05 PM   #7
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
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.
 
Old 08-17-2005, 11:14 PM   #8
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
cd to /home and type ls -la and post the results.
 
Old 08-17-2005, 11:21 PM   #9
czon
Member
 
Registered: Aug 2005
Posts: 39

Original Poster
Rep: Reputation: 15
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?
 
Old 08-17-2005, 11:31 PM   #10
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
Can you not log in as root?
 
Old 08-17-2005, 11:33 PM   #11
czon
Member
 
Registered: Aug 2005
Posts: 39

Original Poster
Rep: Reputation: 15
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
 
Old 08-17-2005, 11:39 PM   #12
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
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.
 
Old 08-17-2005, 11:41 PM   #13
czon
Member
 
Registered: Aug 2005
Posts: 39

Original Poster
Rep: Reputation: 15
ok ill boot up debian and try.. post how it went in a few
 
Old 08-17-2005, 11:49 PM   #14
czon
Member
 
Registered: Aug 2005
Posts: 39

Original Poster
Rep: Reputation: 15
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?
 
Old 08-17-2005, 11:54 PM   #15
czon
Member
 
Registered: Aug 2005
Posts: 39

Original Poster
Rep: Reputation: 15
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

BTW i run Debian Etch, kernel 2.6.12.4 if that helps

Last edited by czon; 08-18-2005 at 12:05 AM.
 
  


Closed Thread


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
lock other users from you /home czon Debian 18 08-19-2005 11:04 PM
users are lock out rude_reality Linux - Hardware 9 06-17-2005 01:24 PM
how would i safely lock users to thier home dir? f1uke Linux - Security 2 07-22-2003 02:23 AM
Lock user in their home dir MarleyGPN Linux - Software 1 04-26-2003 06:12 AM
SSH lock users to the Home Directory jasonweb Linux - Security 2 04-11-2003 07:20 PM


All times are GMT -5. The time now is 08:53 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration