What is Linux Samba? Installation and Configuration
By Jithin on November 29th, 2016
Many organizations need to provide network storage and print services for a range of desktop operating systems, Linux uses the samba server to provide services that Microsoft windows clients can use. A Samba server offers the following services:
1) Share one or more directory trees
2) Share one or more Distributed file-system trees
3) Share printers installed on the server among Windows clients on the network
4) Assist clients with network browsing
5) Authenticate clients logging onto a Windows domain
6) Provide or assist with Windows Internet Name Service name-server resolution
Requirements of Samba Server
1) The Samba RPM packages must be installed on our system. Note that there have been no modifications to the Samba RPMs to support high availability.
2) The Samba daemons will be started and stopped by the cluster infrastructure on per-service basis. Consequently, the Samba configuration information should not be specified in the conventional /etc/samba/samba.conf file. The cluster config tool writes a smb.conf. surname file to the /etc/samba directory for each samba share
3) The automated system startup of the Samba daemons are smb and nmb. It should be disabled in init.d run levels
4) Since the cluster infrastructure stops the cluster-related Samba daemons appropriately, do not manually run the conventional Samba stop script (service smb stop) as this will terminate all cluster-related samba daemons
5) File system mounts for clustered Samba services should not be included in /etc/fstab. Rather, for clustered services, the parameters describing mounts are entered via the Cluster Configuration Tool.
1) Use yum to install Samba package
# yum -y install samba
2) Create the new direcctory /smbdemo
# mkdir /smbdemo
3) change the permission of new directory to 770
# chmod 770 /smdemo
4) Change directory
5) Add three empty files to the new directory:
# touch file1 file2 file3
6) Add Samba user
# smbpasswd -a (username)
7) Follow the below steps to create a smbusers group, change ownership of the /smbdemo directory, and add a user to the group.
[root@localhost smbdemo]# groupadd smbusers
[root@localhost smbdemo]# chown :smbusers /smbdemo/
[root@localhost smbdemo]# usermod -G smbusers don
8) Configuring samba
Samba configuration file done in the file /etc/samba/sm.conf:
Global settings: This specifies where you configure the server. We can find things like authentication method, ports, workgroup names, and server names.
Share: It specifies where you configure each of the shares for the users.
9) In the global section rename the workgroup to your workgroup name
10) Next add the section for/smbdemo, you can add it very bottom of the configuration file as follows.
comment = Linux
path = /smbdemo
browsable = yes
guest ok = yes
Read only = no
create mask = 0755
11) Write and save all changes in the file. And you can test the file using testparm command. When executing the command, the server re-read the file contents. After that you should restart the service smb and nmb. When correctly configured, you can be able to connect from Windows running System and see both general share and the users home directory contents.
If you need any further assistance please contact our support department.