Difference between revisions of "Add several groups and users to an Ibay"

From SME Server
Jump to navigationJump to search
 
Line 19: Line 19:
 
  $OUT .= "write list = \@group1\@group2 userA userB \n";
 
  $OUT .= "write list = \@group1\@group2 userA userB \n";
 
  $OUT .= "valid users = \@group1 \@group2 \@group3 userA userB userC \n";
 
  $OUT .= "valid users = \@group1 \@group2 \@group3 userA userB userC \n";
Edit the  
+
 
'write list ='
+
Edit the 'write list =' to include any group or user who should have Write access to the Ibay.
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
+
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.  
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  
+
Any user who is not in the 'valid users =' list will NOT have access to the Ibay.  
'inherit permissions = yes', all files and folders will maintain the Ibay group permissions (this is good).
+
 
 +
As the default template includes 'inherit permissions = yes', all files and folders will maintain the Ibay group permissions (this is good).
  
 
COMMENT:
 
COMMENT:

Latest revision as of 23:50, 8 June 2015

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