User Accounts Can View Each Other's Home Directory

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

User Accounts Can View Each Other's Home Directory

Postby stoneheart on Fri Mar 13, 2009 12:23 am

Newbie here. I want to create a guest account on my system. I tried using the gui application, but when I opened it, it did not give me the option to create a new account, likely because I am not root. (I was not prompted for the sudo password like I thought I would be.) I then tried it using the sudo adduser command and was successful. However, when I login as the new account there seems to be no permissions enforcement as I can view my master account's directories and files.

Any ideas on how to fix this?
stoneheart
Level 1
Level 1
 
Posts: 11
Joined: Fri Mar 13, 2009 12:16 am

Linux Mint is funded by ads and donations.
 

Re: User Accounts Can View Each Other's Home Directory

Postby Fred on Fri Mar 13, 2009 1:19 am

stoneheart,

Log in as username1 and open a terminal and type one line at a time and press enter: (Substitute your username for username1 and the second username for username2.)

sudo chown -R username1:username1 /home/username1

sudo chown -R username2:username2 /home/username2

sudo chmod -R 600 /home/username1

sudo chmod -R 600 /home/username2

Close terminal. Now neither user will be able to access the others /home folder.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: User Accounts Can View Each Other's Home Directory

Postby stoneheart on Fri Mar 13, 2009 2:10 am

Thanks, Fred. These commands must change the permissions on the directories...Please indulge my curiosity, though... Is this the correct default behavior on setup of new accounts or is this a 'bug' in Mint/Ubuntu? If this is the correct behavior, it makes me wonder what the purpose of having separate accounts are.

Thanks again!
stoneheart
Level 1
Level 1
 
Posts: 11
Joined: Fri Mar 13, 2009 12:16 am

Re: User Accounts Can View Each Other's Home Directory

Postby Fred on Fri Mar 13, 2009 2:16 am

stoneheart,

I can't give you a good answer. The default permissions are set by the developers of the individual distros. In practice you will see various permission sets from one distro to another, and even between versions. I guess it depends on how the developers see the distro being used. As you can see file/folder ownership and permissions are easily set so it doesn't seem to be a big issue.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA


Return to Newbie Questions

Who is online

Users browsing this forum: devsfan1830, Google [Bot], highwind, jl91569, The Big O, xerion567 and 27 guests