1. Make sure internet is available on the system.
  2. Make sure that user has proper permission to install software on the system.

To install software on REDHAT a user needs to have Super user permission thus in order to install Samba user must use root to install it.

yum update

yum install samba

Untitled1

Figure: Samba installation on REDHAT

 

  1. Add a user to samba and assign password to that user. Next step demonstrates method to add user to samba and assign samba password for that user. This process needs root permissions.

 

smbpasswd -a root

(-a is for adding user to samba and root is username to be added to samba)

Untitled2

Figure: Adding user to samba and assigning samba password for the user.

smbpasswd adds a user to samba and assigns samba password for the user. User will see error message if user does not exists on the Linux system.

Untitled3

Figure: Error adding user to samba as user does not exists on Linux machine.

  1. Testing samba demons smb and nmb. This requires root permission.

service smb restart

service nmb restart

Untitled4

Figure: Restarting smb and nmb

Samba Configuration

Adding a folder to network share

Samba shares can be configured through /etc/samba/smb.conf file which holds configuration details for samba server.

  1. Open smb.conf present inside /etc/samba/smb.conf using VI editor. Open file with root permissions as user may need to edit file.

vi /etc/samba/smb.conf

 

  1. E.g. User wants to make SharedFolders present at /opt/Ephesoft/SharedFolders as shareable on samba share. User can do this by adding/appending following line to the end of smb.conf file. But before this user will need to give read, write, execute permission to everyone on the sharedfolders by executing following command (by default Ephesoft installer assigns rwx permission to everyone on SharedFolders):

chmod –R 777 /opt/Ephesoft/SharedFolders

Append following lines to end of smb.conf.

 

[ephesoft]
comment=ephesoft
path=/opt/Ephesoft/SharedFolders
browseable=yes
writable=yes
create mode=0777
directory mode=0777
share mode=yes
guest ok=yes
valid users=root

 

Untitled5

Figure: Share created with name ephesoft which point to /opt/Ephesoft/SharedFolders on machine

 

Details of parameters added to smb.conf

 

  1. Comment: comment for the shared folder.
  2. path : specifies the path of shared folder.
  3. browseable : allows to browse the files from file system.
  4. writeable : makes the shared folder writeable
  5. create mode : create files with group=rw permissions.
  6. directory mode : create dirs. with group=rw permissions.
  7. guest ok:allows guest access
  8. valid users : specifies list of valid users who can access the shared folder (users must be part of user-group assigned to the shared folder).
  9. Assign multiple users to list of valid users as one credential can be used by single machine at a time.

 

User will need to create the share with write, creation, readable and browseable permissions etc. The statements mentioned above make sure of the same.

 

  1. Save smb.conf file and restart smb and nmb demons by executing following commands.

service smb restart

service nmb restart

Untitled6

Figure: restarting samba smb/nmb demons

 

Now user can access this shared folder.

Untitled7

Figure: sharedfolders accessible on network

 

Accessing SharedFolders on different Ephesoft nodes in multi-cluster setup

 

In order to setup SharedFolders on different Ephesoft nodes in multi-cluster setup user will need to mount the network share on a folder on every Ephesoft  Linux node as Linux doesn’t unserstand network paths as windows does i.e. on windows network share can be directly access using \\ip –addr but on Linux it can be done using samba protocol which works in different manner.

 

Note: Installer will create a empty folder on same location on every Ephesoft node other than the node on which actual shared folder lies i.e. path of empty folder will be same as path of actual shared folder on machine where actual shared folders lies e.g. In above configuration where SharedFolder has been added to samba share the actual folder lies at /opt/Ephesoft/SharedFolders so empty folder will be created at same path on each machine using Ephesoft installer.

 

Now user will have to mount the network sharedfolders on each empty folders created by installer on each Ephesoft node.

 

Mounting network share on empty folders created by installer

User can mount the samba share over an empty folder by executing following command.

mount -t cifs -o user=root,password=root //<ip-addres>/ephesoft /opt/Ephesoft/SharedFolders

Here password is the password of smbuser for which smbpasswd was set.

Untitled8

Figure: mounting share on empty folder /opt/Ephesoft/SharedFolders

Untitled9

Figure: network shared folder mounted on empty folder on another Ephesoft node.

User will be able to access the mounted shared folder locally by accessing /opt/Ephesoft/SharedFolders as this folder is acting as mount point for network share. User will be able to create/modify files/folders locally on this path and changes will be reflected on the network share and on all the machines where this network share has been mounted.

Untitled10

Figure: User able to access the SharedFolder locally on mounted folder.

Untitled11

Figure: User creating folder on the mounted folder and these changes will be reflected on all the mount points and network share.

Untitled12

Figure: Changes of folder creation reflected on the network share.

Note*: Ephesoft META-INF properties file will contain the path of locally mounted folders and not the network path as Linux doesn’t understand the network share like windows do. Linux makes use of smb protocol to access the share folder. Hence user will have to mount network shared folders locally on their system such that Ephesoft is able to see data on same path on every system.  



Was this article helpful to you?

J.D. Abbey

Comments are closed.