You are on page 1of 11

A Term Paper on

Master of Computer Application


Setting and configuring a Samba Server

Submitted by Submitted to
Shiba prasad prusty Dr.Devender Kumar
Reg No:12214969 ID:28818
Rollno:11

P a g e 1 | 10
1. ABSTRACT Because the security policy only needs to be
applied to the file server, it offers the chance
Samba is the widely used set of Windows to implement a more restricted and
interoperability applications for Linux and concentrated security policy.
Unix. Samba server is an FTP type of server.
You can offer a storage solution that is more
While it has essentially two fundamental
stable and dependable thanks to it. It makes it
components to a samba server the storage
possible for you to use high-end machines
space itself and the mechanism for accessing
with high levels of uptime to implement your
it. In this we are going to know about the
storage solution. Furthermore, it is easier to
setting and configuration of the samba server
build RAID or mirror SCSI discs on a central
in the Red-hat Linux operating system in
file server than it is on many PCs, which help
detail.
maintain data dependability.
General Term: Samba Server
Additionally, there are benefits in terms of
2. INTRODUCTION the cost of file storage although this is less
pertinent in these days of cheap storage. First,
Things were a little more difficult and by making it available to all users, it makes
expensive in the old technologies, but they the best use of the storage space available.
were also less effective. The management of Second, it offers a central location where
the hardware and software needed to execute everyone can access shared resources
their commercial activities cost the firms a lot eliminating the need for each user to store
of money. However, current technology is their own copy.
lowering the cost of the facilities for
organisations and corporations. For instance, 3. REVIEW OF RELATED WORK
a decade ago, the trend toward workstations AND HISTORY OF SAMBA
was the preference of corporations for SERVER
discrete platforms on which to run their
business operations. However, in modern In December 1991 and January1992, while
times, the same business prefers to run their pursuing his PhD at the Australian National
processes on the share platform. In this we'll University, Andrew Tridgell created the
delve deep into one element that makes initial iteration of Samba Unix by analysing
resource sharing really simple. One of the the network traffic of the DEC Pathworks
most potent servers that makes it simple for server software protocol using a packet
other operating systems to access shared files sniffer.It did not have a formal name at the
and practical resources like printers is the time of the first releases, versions0.1,0.5,
Linux samba server. and1.0, all from the first half of January1992;
Tridgell simply referred to it as "a Unix file
It lowers the cost of administration. You may server for Dos Pathworks. Tridgell produced
keep all of your vital data in one location (on "netbios for unix," observer, version 1.5 in
the file server) rather than having it spread December 1993 with a focus on compatibility
out among numerous different PCs, each of with Microsoft's LAN Manager. This version
which would need to be backed up. The only was the first to incorporate both client and
device that requires routine backup is the file server software.
server.

P a g e 2 | 10
At this time, GPL2 was also selected as the Only development was carried on using
licence. The name was changed to smbserver version.The project made the decision to
in the middle of the 1.5-series. Tridgell, switch to time-based releases with version
however, received a trademark notice from 3.2. Every six months, brand-new major
the business "Syntax," which offered a releases like 3.3, 3.4, etc., will be made
product called TotalNet Advanced Server available. Point releases will only containbug
and had the "SMBserver" brand. By using the fixes; new features will only be includedafter
Unix command grep to search the system a major release. Furthermore, GPL2 was
vocabulary for words that contained the replaced by GPL3 in version 3.2, and some
letters S, M, and B in that order, the name components were provided under LGPL3.
"Samba" was created. The primary technological improvement in
version 3.2 was the autogeneration of a large
The name was changed to SUB server in the portion of the previously handwritten
middle of the 1.5-series. Tridgell, however, DCE/RPC-code. On July 1st, 2008, version
received a trademark notice from the business 3.2.0 was made available. [10] The most
"Syntax," which offered a product called recent version, 3.2.15, was released on
Total Net Advanced Server and had the October 1, 2009. On March 1, 2010, the
"SBM Server" brand. By using the Unix 3.2.x series was formally declared no longer
command grep to search the system supported.
vocabulary for words that contained the
letters S, M, and B in that order, the name Samba 3.6.3 and earlier versions have major
"Samba" was created. security flaws that might allow unauthorised
users to connect anonymously and exploit a
Versions 1.6, 1.7, 1.8, and 1.9 were released bug in Samba's remote procedure call to take
very soon after, with version 1.9 debuting in control of a machine. Bad lock ,a critical
January 1995. Tridgell believes that the security flaw in Windows and Samba, was
Samba Team officially began in May 1996 made public on April 12, 2016. CVE-2016-
with the adoption of CVS, notwithstanding 2118 makes reference to Badlock for Samba
earlier contributions from others, including (SAMR and LSA man in the middle attacks
Jeremy Allison. Versions 2.0.0 and 2.2.0 possible). Eternal Red, also known as Samba
were released in January 1999 and April Cry, a remote code execution vulnerability,
2001, respectively. was discovered in Samba on May 24, 2017,
On September 23, 2003, a significant update, and it affects all versions of the software
version 3.0.0, was made available. Despite starting with 3.5.0. The identification number
not being a domain controller, Samba now for this vulnerability is CVE-2017-7494.
has the option to join Active Directory as a
member. [7] Minor additional features have
been introduced to 3.0 through subsequent 4. ABOUT SAMBA SERVER
point releases. The most recent version in this
One of the most potent Linux servers, the
series as of right now is 3.0.37, which was
Samba server enables us to connect different
made available on a voluntary basis on
resources like printers and files with multiple
October 1, 2009. [8] On August 5, 2009, the
operating systems.
3.0.x series officially reached its end of life.

P a g e 3 | 10
The implementation of the essential protocol, area itself, and the means of accessing it. You
such as the common internet file system or will utilise a file system to store your files
server message block, is thought to be done whether you're working on a solitary machine
using open-source software. It is the system at home or as part of a sizable network in a
that uses Linux as its foundation yet enables large company. A file server adds the idea
connection with Windows. that the file system is shared and accessible
by (potentially) many users.
This server's major objective is to share files
or printers so that they may be used Using a file server has several advantages,
effectively. Its capacity for resource sharing including the following:
justifies the notion that it is a powerful 1. It lowers the cost of administration. You
system. may keep all of your vital data in one location
Linux's samba server, which makes resource (on the file server) rather than having it
sharing for things like files and printers spread out among numerous different PCs,
incredibly simple and easy, can also be each of which would need to be backed up.
thought of as open-source software. To share The only device that requires routine backup
resources, communication with window- is the file server.
based systems can be established with 2. Having to simply apply the security policy
sufficient power. to the file server gives the chance to
It is crucial to realise that in order to function implement a more regulated and focused
or to enable resource sharing, it relies on the security policy.
SMB/CIFS protocol. It is one of the most 3. You can offer a storage solution that ismore
important tools Linux has to offer the stable and dependable thanks to it. It makes it
complete answer to work for making things possible for you to use high-end machines
simpler for businesses and experts. We'll now with high levels of uptime to implement your
examine the Samba server's operation. storage solution. 4.Furthermore, it is easier to
5. CONFIGURATION AND build RAID or mirror SCSI discs on a central
file server thanit is on many PCs, which help
INSTALLATION OF SAMBA maintain data dependability.
SERVER
5) In terms of file storage costs, there is also
5.1 Setting up a File Server something to be gained (although this is less
important now that storage is soinexpensive).
In its most basic form, a file server is a shared
In the first place, it maximisesthe utilisation
storage area. File servers often offer its users
of the storage capacity by making it available
a central location for file storage and may be
to all users. Second, it offers a central
accessed across a network. When you need to
location where shared resources can be made
share files with other users, file systems are
available to everyone.
also useful since you can just put the file in a
public directory on the file server so thatother The technique that allows the file system to
users can access it. be shared is what distinguishes a file server
once it has a file system. There is a tonne of
Similar to FTP servers, a file server
essentially has two basic parts: the storage

P a g e 4 | 10
software available for this purpose, including
Coda, Samba, the Network File System
(NFS), and the Andrew file system (AFS).
Some of these are included in the Red Hat
Linux 9 distribution; we'll concentrate on
Samba specifically.

5.2 INSTALLING OF SAMBA


SERVER
Here we are installing samba server in the red
hat Linux operating system. Steps to
installation of samba server as follows
5.2.1 INSTALLING REQUIRED 5.2.2 CREATE A NEW USER AND
PACKAGES USER PASSWORD OF RHL
At first mount the cd drive and install the Create user name by using useradd
following packages command in red hat Linux it followed by the
user’s name and set password to the user by
a. Install Samba-common package to using passwd command as shown here
share on cross platform.
b. Install Samba which is main samba
config file.
c. Install Samba-client for the samba
clients.

5.2.3 SETTING OF SMB PASSWORD


Use the command smbpasswd -a and
followed by user name to reset the password
as shown below

Install these packages using rpm (Red Hat


Package Manager) in the terminal followed
by -ivh and path of the packages in the cd by
as shown below picture

P a g e 5 | 10
secrets.tdb This is the database of
Samba secrets. Private
We can also check the encrypted password
data is kept there,
using the gedit followed by the path as gedit
including the machine
/etc/samba/smbpasswd as shown below
trust password and local
SID. Since it was
generated by a machine, a
text editor cannot read it.
Smbusers This text file maps the
users on your Linux
system to different SMB-
specific usernames.
smbpasswd This password file is
encrypted. This file's
5.2.4 CREATE A FOLDER AND A
format is fairly similar to
FILE IN IT the passwd file's. When
Here we are creating a sample file for the you first install Samba,
purpose of testing create the folder inside this file doesn't exist;
path home/samba and now create the file in instead, it is created when
that folder /home/samba/smbfolder/smbtest. you add Samba users.

Here we use mkdir command to create a


directory and cat to create a text file. 5.2.6 PROGRAMS USED WHILE
WORKING WITH SAMBA
program Purpose
Smbclient Access SMB/CIFS
resources on a file
server using this
client, which
resembles an FTP
server.
Smbadduser This script is used
5.2.5 SAMBA CONFIGURATION to add users to
Samba. It updates
FILES the passwd file,
smbusers, and
Configuration Description smbpasswd files.
File When you first
smb.conf For Samba, this file install Samba, this
serves as the primary file doesn't exist;
configuration. instead, it is created
when you add
Samba users.

P a g e 6 | 10
Lmhosts Samba's NetBIOS-to-IP
address mappings are
contained in this.

P a g e 7 | 10
Smbpasswd This modifies the
SMB password for
a Samba user. It is
comparable to the
passwd command
in Unix.
Smbmount You can mount an
SMB filesystem 2. STOPPING SERVER
with this.
Smbunmount An SMB file We can use commands for stoping
system can be samba service as ‘service smb stop’ as
unmounted using shown below
this.
Smbstatus This displays a list
of the open Samba
connections.
Testparm This validates the
smb.conf
configuration file's
accuracy. 5.2.7 MAKING CHANGES IN
nmblookup Using NetBIOS via CONFIGURATION FILE
TCP/IP, this is used Here we are making changes in the samba
to query NetBIOS configuration file to open the samba.conf
names and map file follow this path as gedit /etc /samba
them to IP /samba.conf then this file will open now
addresses in a make the following changes in it
network.
Step1: Now read the note point that
whenever you modify this file you should
5.2.7 STARTING AND STOPPING sun the command “testparm” as shown
THE SAMBA SERVICE below picture

1. STARTING SERVER:
We can use commands for starting
samba service as ‘service smb start’ as
shown below

P a g e 8 | 10
Step2: Now go to the global settings and
change workgroup = ms home as shown
below
Step5: Now in [homes] change create mode
= 0777 as shown below

Step 6: At the bottom of the smb.conf file


write as shown
[smbfolder]
Step3: Check the smb.conf man page Path=/home/samba/smbfolder
; hostes allow = 192.168.2 127 Public = no
Printable = no
Create mask = 0775

Step4: change security = share as shown Step 7: In command promt smbclient -L ip


below address -U user name

P a g e 9 | 10
 Hackers will be able to steal your
personal information and sensitive
Step8: Now open smb.conf file and change information from all the data,
printer = yes usernames, and passwords that files
include.
 FTP is susceptible to hacking.
 Monitoring activity is impossible
 Over https, TLS 1.2 is not supported.
 difficult to script jobs
 can unintentionally delete, erase, or
Start samba service and execute the samba alter critical server files.
client command to establish connection with  Connection loss is regularly
the server using server’s IP address and experienced.
samba user details.so we have installed and
configured samba server in red hat linux
8. ACKNOWLEDGEMENT:
7. MERITS AND DEMERITS Thank you to Everyone who contributed to
the completion of this research work
7.1 MARITS OF SAMBA SERVER
especially NAVPREET KAUR Mam
 Share a directory tree or several trees
 Distributed filesystem (Dfs) trees can
be shared in any number. 9. CONCLUSION
 Share printers installed on the server
One of the most potent servers that makes it
with networked Windows clients.
simple for other operating systems to access
 Help clients navigate the network
shared files and practical resources like
 verifying client identities when they printers is the Linux samba server. Given
join a Windows domain that it is open-source software, you can get it
 Resolution of Windows Internet for nothing. It functions as a centralised
Name Service (WINS) name-servers system that actually links different operating
should be provided or assisted with. systems with the shared resources that are
available. It is a crucial server because by
7.2 DEMARITS OF SAMBA SERVER making resources available for sharing, it
(FTP SERVER) makes functioning simple and affordable.

 All FTP servers lack an encryption 10. REFERENCES


feature, making it impossible to Introducing Samba
secure data transfer. J Blair - Linux Journal, 1998 - dl.acm.or
 Bruce force attacks, when several
password hackers crack your
password, can be used to break weak [BOOK] Using Samba
passwords.

P a g e 10 | 10
R Eckstein, D Collier-Brown, P Kelly -
2000 - inweboftp.free.fr

Realization of Files Sharing


between Linux and Windows
Based on Samba

Z Huili - 2008 International Seminar on


Future BioMedical …, 2008 -
ieeexplore.ieee.org

Samba (software) - Wikipedia


Samba Server in Linux | Create, Work,
Access Samba Server in Linux
(educba.com)
[PDF] Just what is SMB?
R Sharpe - Oct, 2002 - docentes.uaa.mx

P a g e 11 | 10

You might also like