How do I set up a Samba share?
Table of Contents
How to set up Samba in Ubuntu/Linux, and access it in Mac OS and Windows
- Open the terminal.
- Install samba with the following command: sudo apt-get install samba smbfs.
- Configure samba typing: vi /etc/samba/smb.conf.
- Set your workgroup (if necesary).
- Set your share folders.
- Restart samba.
How do I connect to a Samba server in Ubuntu?
Connecting to Share
- On Ubuntu: Open up the default file manager and click Connect to Server then enter:
- On macOS: In the Finder menu, click Go > Connect to Server then enter:
- You’ll be prompted for your credentials. Enter them to connect!
To access Samba share via GUI, open Linux File Manager. Click on Connect to Server on the left pane of the File Manager window. In a Connect to Server window, enter the Samba server address in the following syntax and click Connect. The following screen will appear.
How do I share a drive in Samba?
Open the Ubuntu Nautilus file browser and right-click on the hard drive you want to share. Select Properties from the menu, and click on the Local Network Share tab. Select Share This Folder, and Allow Others to Create and Delete files in this folder. Click Modify Share.
To access Samba from a UNIX client session:
- Log on to the Linux or UNIX computer using the Active Directory account that has been granted access to the local computer’s zone.
- Run the following command: smbclient -k -L host_name.
How do I set samba permissions?
Create a Samba password for the user with the command smbpasswd -a shares. Type and verify a password for the user. Create the folder with the command sudo mkdir -p /samba/shares. Change the permissions of the folder with the command sudo chmod -R 0770 /samba/shares.
Access a Windows shared folder from Linux, using Nautilus
- Open Nautilus.
- From the File menu, select Connect to Server.
- In the Service type drop-down box, select Windows share.
- In the Server field, enter the name of your computer.
- Click Connect.
How do I change permissions on a Samba share?
Public writable Share in samba
- Install samba. sudo su – apt-get install samba smbclient.
- Make a backup copy of the original configuration files. cp -av /etc/samba /etc/samba.orig.
- Create directory to be shared. mkdir -p /share chmod -R a+rwx /share.
- Configure samba to allow public writable shares.