Samba users getting locked

Issues related to configuring your network
Post Reply
Linuxneophite
Posts: 15
Joined: 2014/05/20 12:17:41

Samba users getting locked

Post by Linuxneophite » 2014/08/28 19:32:31

Hi.

I setup some users in samba and then put them into groups. I added user passwords and then samba passwords.
The samba shares are in the /home folder.

The Samba shares are /home/Level1 /home/Level2 /home/level3.
I then set them up so that all Level1,2, and 3 have 0777 permissions. They are assigned to groups.
All the shares can be seem by windows xp and windows 7 perfectly.

The problem that I am encountering is that as soon a user copies folders into any of the Samba share folders or creates a file/folder inside one of the folders, then suddenly all the other users can see the folder and read everything but cannot create any folder or add any files to the folder as that user takes the write abilities to the folder that they create. This of coarse is a nightmare when someone constant gets "read-only" when trying to work in excel.
group 1 can access Level1, group2 can access Level1 and Level2 folder and group3 can access Level1,2 and 3 folders. I have tested it and a group1 cannot access 2 or 3 and group2 cannot access Level3 and also group3 can access them all and group2 can access the folders Level2 and Level1, so i am happy with that?

If I go into windows and click on the folder and change it so that everyone has full attributes then it works and the other users can write again to that folder.

My concern is that this does not seem to be right or secure. All the folders in the /home directory look like this
drwx-drwx-drwx:nobody:nobody ........... : Level1

Has this got something to do with the fact that nobody is the owner and nobody is the group.
In Smb.conf, I removed the [homes] share and created the 3 Level folders, ill type out an example below.

[Level2]
comment = Level2
path = /home/Level2
browseable = yes
writable = yes
read only = no
valid user = @group1 @group2 @serveradmin

Please assist if you know why it would be locking the files so that other users cannot write to them?

Also, if you know a way to get samba to ask for the username and password whenever a user logs in, that would be great, I want to do it just on the Level3 folder.

Any help will be very greatly appreciated.

Linuxneophite
Posts: 15
Joined: 2014/05/20 12:17:41

Re: Samba users getting locked

Post by Linuxneophite » 2014/08/30 10:03:56

Just a question to throw out there to the more experienced users regarding this.....

Been wrapping my brain around this now, is it at all possible that the problems are been encountered due to the fact that the shares are in the /home directory?

Not at the office now, but perhaps it has something to do with them been within the /homes directory and how Centos handles its permissions within that directory?

Post Reply