red hat samba server
TRANSCRIPT
-
7/30/2019 Red Hat Samba Server
1/26
Presented by:
Anand Pandey
Roll No.: 0934313002
Prashant Kumar
Roll No.: 0934313013
Under Supervision of:
Mr. Ram Sharan Mishra
-
7/30/2019 Red Hat Samba Server
2/26
Linux is a free Unix-type operating system originally created by
Linus Torvalds when he was a student at the University of Helsinki.
It originated in 1991 as a personal project of Linus Torvalds.
Developed under the GNU General Public License, the source code
for Linux is freely available to everyone.
One of Linuxs most interesting features is that it is not acommercial product; instead, it is a collaborative project developed
over the Internet.
-
7/30/2019 Red Hat Samba Server
3/26
To understand Linux, we must first discuss the first Unix system.
Unix is a multi-user, multi-tasking operating system. Many users
can be logged into a system simultaneously, each running manyprograms.
First Version was created in Bell Labs in 1969. Some of the Bell
Labs programmers who had worked on this project, Ken
Thompson, Dennis Ritchie, Rudd Canaday, and Doug McIlroy
designed and implemented the first version of the Unix File System
on a PDP-7 along with a few utilities.
-
7/30/2019 Red Hat Samba Server
4/26
In 1973 Unix is re-written mostly in C, a new language developed
by Dennis Ritchie.
00:00:00 Hours, Jan 1, 1970 is time zero for UNIX. It is also called
as epoch.
The Unix file system looks like an inverted tree structure. You
start with the root directory, denoted by /, at the top and work
down through sub-directories underneath it.
-
7/30/2019 Red Hat Samba Server
5/26
A simple description of the UNIX
system, also applicable to Linux, is this:
"On a UNIX system, everything is a file;
if something is not a file, it is a process.
In 1991 Linux was originated.
-
7/30/2019 Red Hat Samba Server
6/26
-
7/30/2019 Red Hat Samba Server
7/26
Red Hat Enterprise Linux 6 is the latest release of Red Hat's
trusted datacenter platform, delivers advances in application
performance, scalability, and security.
With Red Hat Enterprise Linux 6, you can deploy physical,
virtual, and cloud computing within your datacenter, reducing
complexity, increasing efficiency, and minimizing administration
overhead while leveraging existing technical skills and operational
know-how.
-
7/30/2019 Red Hat Samba Server
8/26
-
7/30/2019 Red Hat Samba Server
9/26
Samba is the Linux implementation of the networking protocols
used to connect Microsoft operating systems.
Microsoft networking is based on the Common Internet File
System (CIFS), which was developed from the Server Message
Block (SMB) protocol.
CIFS (Common Internet File System) is the standard file and
print sharing system for Microsoft Windows clients in Windows
server environments.
-
7/30/2019 Red Hat Samba Server
10/26
Samba is an open-source suite of programs that can be installed
on a Red Hat Enterprise Linux 6 server to provide seamless file
and print services to Microsoft Windows clients.
Samba is a strong network service for file and print sharing that
works on the majority of operating systems available today.
Samba Packages are:
samba.x86_64 samba-client.x86_64
samba-common.x86_64 samba-winbind.x86_64
samba-winbind-clients.x86_64
-
7/30/2019 Red Hat Samba Server
11/26
Step 1 : First we check there is samba server package is installed or
not. If not, then we install samba* package with help of yum server.
# rpmqa | grep samba*
# yum install samba* -y
Here samba is installing
-
7/30/2019 Red Hat Samba Server
12/26
Here samba* installation is completed.
-
7/30/2019 Red Hat Samba Server
13/26
Step 2 : Enable the service to start during boot# chkconfig smb on
Step 3 : Start and verify Samba services are running foruse in subsequent steps:
# service smb start
Starting SMB services: [ OK ]
# service smb statussmbd (pid 2733) is running...
# service smb restart
# service smb stop
-
7/30/2019 Red Hat Samba Server
14/26
Two services responsible for running Samba are:smbd Samba server daemon
nmbd NetBIOS service daemon
Samba configuration file:
/etc/samba/smb.conf
Step 1 : Make a safety copy of original configuration file:
# cp -p /etc/samba/smb.conf /etc/samba/smb.conf.orig
# ls -la /etc/samba/smb.*
-rw-r--r--. 1 root root 9778 Feb 18 12:43 smb.conf
-rw-r--r--. 1 root root 9778 Feb 18 12:43 smb.conf.orig
-
7/30/2019 Red Hat Samba Server
15/26
Step 2 : In the next step we open the samba server configurationfile.
# vim /etc/samba/conf/smb.conf
Configuration file open:
-
7/30/2019 Red Hat Samba Server
16/26
-
7/30/2019 Red Hat Samba Server
17/26
Step 4 :We have to create a valid user who has been shared the
directories.
# useradd azon
# smbpasswda azon
User azon has been added.
-
7/30/2019 Red Hat Samba Server
18/26
-
7/30/2019 Red Hat Samba Server
19/26
workgroup = MYGROUP //(Line 74) This shouldmatch windows workgrouphosts allow = 127. 192.168.1. //(Line 80)This will allow
only the networks 127.
and 192.168.1. to access
the services and
remove semicolon (;)
Add these lines at the last of the configuration file:
-
7/30/2019 Red Hat Samba Server
20/26
# ls
lz /dir1# getsebool a | grep samba
# setsebool P use_samba_home_dirs on
# setsebool P samba_create_home_dirs on
# getsebool
a | grep samba
-
7/30/2019 Red Hat Samba Server
21/26
-
7/30/2019 Red Hat Samba Server
22/26
Context changed of directory successfully.
-
7/30/2019 Red Hat Samba Server
23/26
LINUX CLIENT
Now that all our Samba shares are set up, we can access them fromone of the client systems (Client02). Be aware that we need to installthe client Samba packages before we can connect to any Samba
shares.Step 1: Install the client packages:
# yum install -y samba-client samba-common
Step 2: Verify that the install was successful:
# rpm -qa | grep samba
samba-client-3.5.4-68.el6.x86_64
samba-winbind-clients-3.5.4-68.el6.x86_64
samba-common-3.5.4-68.el6.x86_64
-
7/30/2019 Red Hat Samba Server
24/26
# mkdir /opt/company_data
Step 4: Now we try to connect the user.# smbclient //192.168.0.12/azon U SERVER
C
Connection is successfully done.
-
7/30/2019 Red Hat Samba Server
25/26
S
Shared directory is there.
-
7/30/2019 Red Hat Samba Server
26/26