LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Configuring access rights for a guest (https://www.linuxquestions.org/questions/linux-security-4/configuring-access-rights-for-a-guest-430036/)

Schreiberling 03-30-2006 10:16 AM

Configuring access rights for a guest
 
Hi!

I'm wondering how my configuration could be done for a guest account. I'm using SuSE Linux 10.0 OSS and the configuration tool YaST2. The problem is that my newly created guest account has the right to view and read others peoples' folders. I want to set the rights to that effect that the guest can only view his own files and nothing else! Group assignment like "nogroup" or "nobody" didn't work.

win32sux 03-30-2006 11:14 AM

you could remove the "others" permissions from people's home folders... this way nobody can look at someone else's home folder... if you do it this way then you don't need to create any special groups or anything... kinda like:
Code:

chmod 750 /home/*
EDIT: the above was actually a mistake on my part, as it should be a 700 and NOT a 750... unless of course each user on the system would have his own group...

Schreiberling 03-30-2006 12:57 PM

What I'm looking for is that my guest account doesn't belong to any group at all so he couldn't do anything except his own stuff, or identical user and group. I mean, it's far more complicated to configure each thing you want to protect instead of making clear one time for a user what he's able to do and what he's not. It would be too risky for me to change access rights of many folders because it can be difficult undoing that.

gilead 03-30-2006 01:40 PM

Even if your user didn't belong to any groups, the 'other' part of the permissions will let them see files in home directories unless it is set to 0 as in win32sux's example. Another way to get the same result if you don't want to modify user/group permissions, just others, is:
Code:

chmod o-rwx /home/*
The main risk in doing this is if there is a home directory that everyone should access, it will now be unavailable.

win32sux 03-30-2006 04:50 PM

please see the correction i made to my post above...

the proper way to achive privacy between users is with:
Code:

chmod 700 /home/*
this way you can rest assured that only the owner of the home folder will be able to read/write/enter it...

Quote:

Originally Posted by Schreiberling
It would be too risky for me to change access rights of many folders because it can be difficult undoing that.

no way, it's very easy to undo this... just set the perms back to the usual 755, like:
Code:

chmod 755 /home/*
and then everyone can snoop around everyone else's private stuff again... :)

BTW, keep in mind that you could also specify which user is the one you don't want to have his privacy violated, like:
Code:

chmod 700 /home/schreiberling
now nobody will be able to snoop on user schreiberling, while the permissions for the other users' home folders remain untouched...


All times are GMT -5. The time now is 10:15 PM.