SAMBA SERVER

SAMBA(CENTOS 6.0)

  • Samba is a n open source suite that provides seamless file and print services to Server Message Block(SMB) clients.
  • It allows for interoperability between Linux/Unix servers and windows based clients.
  • Samba sets up network shares of Unix/Linux directories. These appear to windows users as normal windows folders accessible via the network.
  • Unix users can mount the shares directly as part of their file structure.

Requirements:-

  • Installation Packages
    -Samba*
  • Configuration File
    -etc/samba/smb.conf
  • Port Numbers
    • 137-NetBios Name Service
    • 138-NetBios Datagram Service
    • 139-NetBios Session Service
     
  • Service
    -smb
  • Daemon
    • nmbd
    • smbd
     
  1.  It is a default service in Linux operating system, which is used to share files, directories and Hardware resources.
  2. Generally Samba server configure within the LAN network.
  3. Samba server is also known as Centralized database server.
  4. Clients of any operating system, in that Windows operating system used around 80%.
  5. Linux client access the data with the help of NFS method with File System CIFS( Common Internet File Sharing) & FTP Method.
  6. Windows clients access the data with the help of MAP network drive.
  7. For Samba server there is user and password security.
All the user requires samba password authentication.
  

Configuration steps for Samba server in Cent OS 6.0

 Step1: to configure Samba server
Check system IP address
#ifconfig eth0
Assign the host name temporarily and permanent.
#hostname samba.group.com
# vi /etc/sysconfig/network
Edit the hostname
HOSTNAME=samba.group.com
:wq!
Add the host entries.
#vi /etc/hosts
go to insert mode
192.168.1.253    samba.group.com    samba
:wq!
Then logoff & login
 
Now install the package.

#yum install samba* -y

Create three users

#useradd u1
#useradd u2
#useradd u3
 Assign the samba password to the users.
#smbpasswd -a u1
New SMB password: *******
Retype new SMB password: ********
Added user u1.
#smbpasswd -a u2
New SMB password: *******
Retype new SMB password: ********
Added user u2.
 #smbpasswd -a u3
New SMB password: *******
Retype new SMB password: ********
Added user u3.
Create a directory with full permission.
#mkdir -m 777 /linuxdata
 Create multiple files
#touch /linuxdata/smb{1..10}
#chmod 666 /linuxdata/smb2
Edit the configuration file
#vim /etc/samba/smb.conf
set the line numbers.
:se nu
go to following line numbers and edit as below
282 [sambashare]
283 comment =  samba group samba server
283 path = /linuxdata
285 valid users = u1,u2,u3(adding manually)
286 public = no
287 writable = yes
288 printable = no
:wq!
Restart the service
#service smb restart
To activate Samba service permanently
#chkconfig smb on
Go the sys2, samba serve linux client configuration, NFS method
 create a directory
#mkdir /localdir
#mount <samba server ip> <sharename> <localmount point> -o username=<username>
#mount //192.168.0.253/sambashare  /localdir -o username=u1
Enter into mount point to 
#cd /localdir
To check the list of files
#ls
Create a file
#touch newfiles{1..10}

Using FTP method:

#smbclient //192.168.0.253/sambashare -U u2
To download file
smb:> get smb2
smb:> quit.

Using Samba server windows client configuration:

Connect to windows pc remotely
#rdekstop 192.168..0.150 -u administrator -p password123 -f
Go to Mycomputer, right click and select "MAP network drive".
Drive: L
Folder:\\192.168.0.253\sambashare
smbusername=u3
smbpassword=*******
Access the directory and create new directory and check the data in samba server.
Verification on the server
#ls /linuxdata

Comments

Popular posts from this blog

Reasoning-Number Series

Reasoning-Letter Series

Multiply Negative numbers in java