65e4523c48993

Network File Sharing In Linux With Cifs/smb

Network File Sharing in Linux with Cifs/Smb

65e4523c48993

Network File Sharing (NFS) allows multiple computers to access files over a network. CIFS (Common Internet File System) and SMB (Server Message Block) are two protocols that are commonly used for NFS in Linux.

65e4523eab498

To set up NFS using Cifs/Smb in Linux, you will need to install the cifs-utils package. Once installed, you can create a mount point for the shared directory. For example, you could create a mount point called /mnt/share.

65e45240dccb8

Next, you will need to edit the /etc/fstab file to add the following line:

//server/share /mnt/share cifs credentials=/etc/cifs-credentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

In this line, “//server/share” is the path to the shared directory on the server, “/mnt/share” is the mount point on the client, “cifs” is the file system type, “credentials=/etc/cifs-credentials” specifies the location of the credentials file, “iocharset=utf8” sets the character set to UTF-8, “file_mode=0777” sets the file permissions to 777, and “dir_mode=0777” sets the directory permissions to 777.

You will also need to create a credentials file at /etc/cifs-credentials. This file should contain the username and password for the user on the server who has access to the shared directory.

Once you have made these changes, you can mount the shared directory by running the following command:

mount /mnt/share

You can now access the shared directory by navigating to the mount point (/mnt/share).

Example:

Let’s say you have a server with a shared directory called “share” and a client with a mount point called “/mnt/share”. You can set up NFS using Cifs/Smb by following these steps:

  1. On the server, create the shared directory and set the permissions to 777:
mkdir /share
chmod 777 /share
  1. On the client, install the cifs-utils package:
sudo apt-get install cifs-utils
  1. Create a mount point for the shared directory:
sudo mkdir /mnt/share
  1. Edit the /etc/fstab file and add the following line:
//server/share /mnt/share cifs credentials=/etc/cifs-credentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
  1. Create a credentials file at /etc/cifs-credentials and add the following lines:
username=user
password=password
  1. Mount the shared directory:
sudo mount /mnt/share

You can now access the shared directory by navigating to the mount point (/mnt/share).

Share this article
Shareable URL
Prev Post

Managing Storage With Raid On Linux

Next Post

Linux Power Management: Tips For Laptop Users

Comments 15
  1. Network File Sharing In Linux With Cifs/smb is an eye opening article for me. It gives new windows in the file sharing protocol. I appreciate the author for this expository piece. With this write up, I will not shy away whenever am opportune to write about file sharing. Thanks to Cifs/smb

  2. Network File Sharing In Linux With Cifs/smb has exposed the failures of the new sharing protocol . This new protocol will not stand the test of time. It’s trash, I repeat, trash.

  3. Reading Network File Sharing In Linux With Cifs/smb, I’ve come to realize the importance of file sharing across different users.

  4. The whole article on Network File Sharing In Linux With Cifs/smb is incorrect. The writer should hv carried out proper research on the theme before writing.

  5. At first, I wondered if Network File Sharing In Linux With Cifs/smb is worthy of my precious time. Boy, I must confess that this article is an epic content; the best I’ve read so far. Keep up the fire author. U̶̲̥̅̊😃

  6. Network File Sharing In Linux With Cifs/smb is a great piece. Except for the grammatical errors that can’t be overlooked. However, the author did a great work to explain the subject matter.

  7. This sure provides an exposition on Network File Sharing In Linux With Cifs/smb, but I must say this; the subject needs more clarity, talk less of the disorganization of the whole article. Come on author, some of us need the full gist not abracadabra

  8. Network File Sharing In Linux With Cifs/smb makes for an interesting read. Good job author, I must confess.

  9. I would like to commend the author for this great effort in bringing to the public Network File Sharing In Linux With Cifs/smb. This is an amazing piece. With this, file sharing across different platforms is simplified . Kudos

  10. Network File Sharing In Linux With Cifs/smbis not convincing at all. No, I don’t think the author understands what he/she is talking abt.

  11. If u want to know more about Network File Sharing In Linux With Cifs/smb, don’t read this write up. It is time wasting.

  12. From this context, we understand that Network File Sharing In Linux With Cifs/smb is crap and a waste of time.

  13. lolz, I can’t help but laugh at this Network File Sharing In Linux With Cifs/smb. The writer is just beating about the bush.

Dodaj komentarz

Twój adres e-mail nie zostanie opublikowany. Wymagane pola są oznaczone *

Read next