Honore With His Spouce IGA KUBUNTU! OWNER. BLOG SITE. This is My Child FUTURE COMPUTER TECHNOLOGY
blogger JavaScript Rocks.

Saturday, 8 June 2013

How to configure samba server in Linux

How to configure samba server in Linux

Most Linux systems are the part of networks that also run Windows systems. Using Linux Samba servers, your Linux and Windows systems can share directories and printers. This is most use full situation where your clients are window native and you want to use the linux security features.
Exam question There are mixed lots of System running on Linux and Windows OS. Some users are working on Windows Operating System. There is a /data directory on linux server should make available on windows to only vinita should have right to connect with samba server . Configure to make available.

Configure samba server

In this example we will configure a samba server and will transfer files from client side.For this example we are using two systems one linux server one window clients.
per quest of samba server
  • A linux server with ip address 192.168.0.254 and hostname Server
  • A window client with ip address 192.168.0.2 and hostname Client2
  • Updated /etc/hosts file on linux system
  • Running portmap and xinetd services
  • Firewall should be off on server
We have configured all these steps in our pervious article.
We suggest you to review that article before start configuration of samba server. Once you have completed the necessary steps follow this guide.
samba rpm is required to configure samba server. check them if not found then install
rpm for samba server
Now check smb, portmap, xinetd service in system service it should be on
 #setup Select  System service from list
 [*]portmap
 [*]xinetd
 [*]smb
Now restart xinetd and portmap and smb service
service restart
To keep on these services after reboot on then via chkconfig command
chkconfig
After reboot verify their status. It must be in running condition
service status
Create a normal user named vinita
useradd
now create /data directory and grant it full permission
mkdir
open /etc/samba/smb.conf main samba configuration files
vi smb.conf
By default name of workgroup is MYGROUP in smb.conf file. you can change it with desire name
workgroup tag
our task is to share data folder for vinita user so go in the end of file and do editing as shown here in this image
share data folder in smb.conf
save file with :wq and exit
Now add vinita user to samba user
smbpasswd
we have made necessary change now on smb service and check it status
service smb status
if you already have on this service then restart it with service smb restart commands.

Client configuration for samba server

Go on windows system and ping samba server, change computer name to client2 and workgroup name to MYGROUP
my computer properties
reboot system after changing workgroup name
After reboot open my network place here you can see samba server [ if not see then click on view workgroup computer in right pane, if still not see then use search button from tool bar and search computer samba server form ip ]
samba server in my network place
First try to login from user nikita she will not successes as nikita have not permission to login
user nikita deny
Now login from user vinita [ give the password which you set with smbpasswd command ]
user vinita
As you can see in image user vinita gets the /data folder which we share from samba server
data folder on widow
Copy some window files in data folder
copy in data folder

Check status on samba server

on samba server you can check runtime status of samba server to check it run smbstatus command
smbstatus
in output you see that one samba shared directory is used on window system

How to configure vnc server in Linux

VNC server is a used to share desktop with remote computer. VNC works on client server architecture. To share desktop you need vnc-server package and to access from other computers you need vnc-viewer. In this tutorials I will show you how to configure vnc server.
For demonstration purpose we will use two linux systems. Both systems should have graphics installed.

To configure VNC- Server

Boot system in init 5 or graphic mode. vnc-server rpm is required to configure server check it if not found install it.
rpm
now click on preferences from system and select remote desktop
vnc
This will launch a new window where you can set sharing and security for remote desktop
set password on server
Allow other users to view your desktop check this option if you to present your desktop on other computer
Allow other users to control your desktop Check this options if you want to grant permission to control user desktop to other user
In security tab you can set password for the user who want to connect with server [Recommended]

Configure Linux client

Go on client system and ping server. vnc-viewer rpm is required to configure clients
vnc viewer
check it and if not found install
Now select accessories from application menu and click on vnc viewer
vnc viewer
this will launch a window Give vnc server ip in it and click on ok
give ip in vnc vieawer
Once connected it will ask for password Give the password which you set on server
enter password in vnc
On server side it will show a pop up and ask for permission click on allow
grant permission
After getting permission from server side you can use server desktop on client side
use server desktop

0 comments:

Post a Comment