[Samba] setuid question

Mark Adams mark at campbell-lange.net
Mon Oct 29 16:02:01 GMT 2007


Hi There,

I cannot comment why the samba config is not working, But you can do
this using standard linux users/groups.

You want to set up your access rights to use GROUPS, this basically
means the user that creates the file, does not mean anything. You've
used chmod u+s - this sets UID or (SUID) which only means any action
(execution) of that file will be run as the user that originally created
it. what you want to use, is chmod g+s on the parent directories. this
will set GID (SGID) making sure that any file created in that directory
keeps the groups ownership.

You will need to give r/w access to the group aswell of course.

See this for instance (google on "about suid and sgid");

http://www.homepage.montana.edu/~unixuser/051602/SUID.html

The next step is to set /etc/groups correctly (manually or using your
command line) so that all users are in required groups.

Then setup samba to users groups instead of users

valid users = @group

the @ sign indicates a group, instead of a user.

Mark

On Wed, Oct 24, 2007 at 12:51:49PM -0500, J. Henrikson wrote:
> I've got a problem I hope someone can help with. We have a directory on a
> redhat box where we want anyone who creates a file (usually done with samba
> access) to have that file be created as if by a special "user" and group..
> Now in the smb.privateshares config file we specify force user and force
> group..
> However when we create a file in this directory it shows it being owned by
> the actual person who created it rather than the user specified in the force
> user = line of the configuration...
> I've tried to use chmod u+s but that doesn't seem to work..
> Can anyone tell me how to achieve this?
> 
> 
> Many thanks.
> John Henrikson
> U of Missouri
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/listinfo/samba


More information about the samba mailing list