Samba Sharing: How to Add and Enable Users
Samba, also known as Samba or smb, is an open-source SMB/CIFS implementation that uses the Server Message Block (SMB) or Common Internet File System (CIFS) protocols, allowing PC-compatible machines to share files, printers, and various information. Samba was originally developed by Andrew Tridgell. The Samba project has been supported by the Samba Team since 2000.
Part 1 Linux Smb (Samba) Share
One way to share files with other Linux computers is with the Samba protocol. Smb stands for SMB, which is short for Server Message Block. The protocol was originally developed by IBM in the early 1980s and enables the sharing of resources like disk drives, printers, and more between different operating systems. I have a document on my Windows PC that I want to upload to my Linux box over Samba so it can be shared by other users on the same network.
Part 2 Windows Smb Share
To access the share from a Windows PC, you will need to install the Windows Smb Client application. The application can be found in the Add or Remove Programs section of Control Panel. Install it then open it for configuration by running smbclient.exe. You’ll be prompted for your username and password; these should be those you specified when setting up samba on your server. Once authenticated, a window titled ‘Share Explorer’ will appear with a list of shared folders on your server. Select the folder you want then click OK. You should now see the contents of that folder in Windows Explorer on your PC!
Part 3 Adding Additional Windows User
This is an important step for security purposes. For example, if we had shared this folder with guest and someone unauthorized got access to their computer, they would be able to see everything on our drive since guest has full control on the folder. To set it up so that only our Windows user account could access the share, we would need to add our own username as an allowed user. In addition, I will disable guest access (to prevent people who have been given temporary computer privileges from seeing anything they shouldn’t). To do this, go into Advanced Settings. Under Access, choose Allow guests and then uncheck the box next to it.
Part 4 Connecting via FTP Client
When you connect to a Samba share, make sure that you connect as a user that is on the computer or has root access.
Most likely this will be the name root with a blank password. If your SSH client asks for a username and password, then enter your username when prompted. Once connected, you’ll have access to all of the files on the network drive. If your network drive is C:\Users\YourUserName on Windows, type cd \\192.168.1.5\c$ at the command prompt to access it in Linux as if it were an ext3 partition available locally on your machine’s filesystem. You can also specify the IP address rather than machine name if necessary.
Part 5 Connecting via File Manager
Connecting to a Samba share is very easy on Ubuntu. File Manager will already have added the required smb:// string to the entry field. Simply enter your credentials, select the desired directory from the browser window that pops up, then click OK or double-click on it.
Extra: Copying from Linux to Windows Section: Extra: Copying from Windows to Linux
## Copying from Windows to Linux To copy files from Windows into a Samba share, go to the folder containing the file(s) you want and drag-and-drop them onto the share in either ‘Computer’ or ‘Network’ explorer. Note that if you’re copying more than one file at a time, they will all be copied over separately. ## Copying from Linux to Windows To copy files from Linux into a Samba share, navigate in Nautilus (or Thunar on KDE) until you find the file(s) you want. You can right-click on any of them, choose Copy Here (KDE users will have an option called Move Here) or choose Ctrl+L.