Add several groups and users to an Ibay

From SME Server
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Hey there cactus i worked it out. We are not limited to the Ibay options 'Admin|Group|Everyone'. We can add or remove as many groups or users to Ibays as we want by modifying the smb.conf.

Create an Ibay and make the permissions 'Write:Group|Read:Everyone' and expand the following template in :

/etc/e-smith/templates-custom/etc/smb.conf/ibays/
{
if ($key eq 'name of ibay')
{
$OUT .= "writable = no\n";
$OUT .= "write list = \@group1\n";
$OUT .= "valid users = \@group1 \@group2\n";
}
}

Multiple groups and users would be written like:

$OUT .= "write list = \@group1\@group2 userA userB \n";
$OUT .= "valid users = \@group1 \@group2 \@group3 userA userB userC \n";

Edit the 'write list =' to include any group or user who should have Write access to the Ibay.

Edit the 'valid users =' to include any group or user who should have Read access to the Ibay. It is important to include the Ibay owner in this list.

Any user who is not in the 'valid users =' list will NOT have access to the Ibay.

As the default template includes 'inherit permissions = yes', all files and folders will maintain the Ibay group permissions (this is good).

COMMENT:

# perl < 5.6.1, error : In string, @group now must be written as \@group. This is why i could not get groups working initially. 

REFERENCES: http://www.comptechdoc.org/os/linux/manual4/smbconf.html http://perl.active-venture.com/pod/perltrap-interpolationtraps.html