码迷,mamicode.com
首页 > 系统相关 > 详细

How to configure samba server in Linux     Print

时间:2014-07-02 16:12:48      阅读:267      评论:0      收藏:0      [点我收藏+]

标签:available   windows   situation   features   question   

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
bubuko.com,布布扣

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
bubuko.com,布布扣
To keep on these services after reboot on then via chkconfig command
bubuko.com,布布扣
After reboot verify their status. It must be in running condition
bubuko.com,布布扣

Create a normal user named vinita
bubuko.com,布布扣

now create /data directory and grant it full permission
bubuko.com,布布扣

open /etc/samba/smb.conf main samba configuration files
bubuko.com,布布扣
By default name of workgroup is MYGROUP in smb.conf file. you can change it with desire name
bubuko.com,布布扣
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
bubuko.com,布布扣
save file with :wq and exit

Now add vinita user to samba user
bubuko.com,布布扣
we have made necessary change now on smb service and check it status
bubuko.com,布布扣
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
bubuko.com,布布扣
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 ]
bubuko.com,布布扣
First try to login from user nikita she will not successes as nikita have not permission to login
bubuko.com,布布扣
Now login from user vinita [ give the password which you set with smbpasswd command ]

bubuko.com,布布扣

As you can see in image user vinita gets the /data folder which we share from samba server
bubuko.com,布布扣
Copy some window files in data folder
bubuko.com,布布扣

Check status on samba server

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


本文出自 “小小鸟你妈” 博客,请务必保留此出处http://xiaoxiaoniao.blog.51cto.com/8727225/1433454

How to configure samba server in Linux     Print,布布扣,bubuko.com

How to configure samba server in Linux     Print

标签:available   windows   situation   features   question   

原文地址:http://xiaoxiaoniao.blog.51cto.com/8727225/1433454

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!