Wednesday, 6 November 2013

SAMBA: File Sharing

Samba: File Sharing

 

Adding a new share


Create a folder that you want to share. In this case I’m creating a share folder called 'files', where I’m going to put all my MSI's.

# mkdir -p /usr/local/samba/files
# nano /usr/local/samba/etc/smb.conf

Add a new share to your smb.conf:

[files] path = /usr/local/samba/files read only = no

Reload Samba:

# smbcontrol all reload-config


Setup share permissions



To configure share permissions, you need an account with SeDiskOperatorPrivilege. To grant this privilege, run the following;

# sudo net -Uadministrator rpc rights grant 'MYSAMBA.LOCAL\Domain Admins' SeDiskOperatorPrivilege

Existing privileges you can reviewed by;

# net rpc rights list accounts -Uadministrator

Log on to a Windows machine using an account, with the anyone part of the user group granted privilege.

  1. Open Computer Management from administrative tools
  2. Click Action -> Connect to another computer.
  3. Enter the name of your Samba server
  4. Navigate to System Tools -> Shared Folders -> Shares“ and select the new added share. 
  5. Right-click the share name, select Properties .
    Go to the Share Permissions tab. 
  6. Configure who can access the share and the appropriate permissions. 
  7. Go to the Security tab, click the Edit button and configure the filesystem permissions. 

Change permissions


  1. Log on to a Windows machine as Domain Administrator.
  2. Navigate to the folder of which you want to change the permissions.
  3. Right-click to the folder and choose Properties.
  4. Go to the Security tab and click the Edit button.
  5. Change the permissions to your needs. 
  6. Save the changes by closing the windows with OK.

Complete


Sources
https://wiki.samba.org/index.php/Setup_and_configure_file_shares

No comments:

Post a Comment