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
# 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.
- Open Computer Management from administrative tools
- Click Action -> Connect to another computer.
- Enter the name of your Samba server
- Navigate to System Tools -> Shared Folders -> Shares“ and select the new added share.
Right-click the share name, select Properties .
Go to the Share Permissions tab.
- Configure who can access the share and the appropriate permissions.
- Go to the Security tab, click the Edit button and configure the filesystem permissions.
- Log on to a Windows machine as Domain Administrator.
- Navigate to the folder of which you want to change the permissions.
- Right-click to the folder and choose Properties.
- Go to the Security tab and click the Edit button.
- Change the permissions to your needs.
- Save the changes by closing the windows with OK.