How to install Samba server on Ubuntu 12.04
Part 1: Configuring anonymous share with samba server
To install the samba package,enter the following command:
sudo apt-get install samba samba-common

Check the version of installed samba software by using this command:
smbd --version

Also install these suggested packages for samba:
sudo apt-get install python-glade2 system-config-samba

Go to your Windows machine and use this command in order to check the WORKGROUP name:
net config workstation

It will show the output, something like this:

Backup the smb.conf file, then delete it and create the new one:
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
sudo rm /etc/samba/smb.conf
sudo touch /etc/samba/smb.conf
sudo nano /etc/samba/smb.conf

Add this, in your smb.conf file (or change it according to your requirement):
#======================= Global Settings =====================================
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = ubuntu
security = user
map to guest = bad user
dns proxy = no
#============================ Share Definitions ==============================
[MyShare]
path = /samba/share
browsable =yes
writable = yes
guest ok = yes
read only = no

Save the smb.conf file and restart the service:
sudo service smbd restart

Access the samba share from windows (where ubuntu is the name of my samba server):

wao, we are able to access the samba share successfully :-)

Let’s try to create something, inside the share folder:

Error, we cannot create anything inside the share folder :-(

Check the current permission on the samba share:
cd /samba/
ls -l

Change it, in such a way that everyone can read and write it(Check it, that it is allowed in your environment or not):
sudo chmod -R share
ls -l

Try to create something again, inside the share folder:

Verify the newly created file on samba server:
cd share/
ls -l

Part 2: Add and manage users and groups
Add a group in your ubuntu server (in my case smbgrp):
sudo addgroup smbgrp

Create a new share, set the permission on the share ,add the user to the samba group and create samba password:
cd /samba/
sudo chown -R arbab:smbgrp secure/
ls -l
sudo chmod -R secure/
ls -l
sudo adduser arbab smbgrp
sudo smbpasswd -a arbab

Add the newly created samba share in smb.conf file:
[secure]
path = /samba/secure
valid users = @smbgrp
guest ok = no
writable = yes
browsable = yes
create mask = 0777

Restart the samba service and check the syntax error with testparm:
sudo service smbd restart
sudo testparm

Testing from Windows Machine:



Verification from Ubuntu server:
cd /samba/secure/
ls -l

Hope this will help you!
Please Remember me in your prayers!
Source page from : http://rbgeek.wordpress.com/2012/04/25/how-to-install-samba-server-on-ubuntu-12-04/
How to install Samba server on Ubuntu 12.04的更多相关文章
- Install Asterisk 11 on Ubuntu 12.04 LTS
http://blogs.digium.com/2012/11/14/how-to-install-asterisk-11-on-ubuntu-12-4-lts/ Last week I put up ...
- install yael on the ubuntu 12.04
1. bits/predefs.h no such file or directory ??? sudo apt-get install gcc-multilib 2. sudo gedit /et ...
- Install eclipse ns3 in ubuntu 14.04
1. NS3 install 参考NS3 tutorial即可. 2.eclipse 2.1下载 下载地址:http://www.eclipse.org/downloads/ ...
- Ubuntu 12.04安装Adobe Reader
原本从Adobe 官方网站下载了 Adobe Reader, 是个rpm包,先用agt-get 装了rpm(sudo apt-get install rpm), 一安装(rpm -ivh AdobeR ...
- 【NS2】Installing ns-2.29 in Ubuntu 12.04
Installing ns-2.29 in Ubuntu 12.04 Off late, we try to use(install) a old software in a new Oper ...
- ubuntu 12.04 install docker-engine1.12.3
root@node3:/data/src# cat /etc/issueUbuntu 12.04.4 LTS \n \l root@node3:/data/src# cat /etc/apt/so ...
- 在Ubuntu 12.04安装和设置Samba实现网上邻居共享
转载:http://www.startos.com/ubuntu/tips/2012031333097.html 有微小改动. Samba 是一款功能强大的共享工具,可以实现与win ...
- OpenStack Havana 部署在Ubuntu 12.04 Server 【OVS+GRE】(三)——计算节点的安装
序:OpenStack Havana 部署在Ubuntu 12.04 Server [OVS+GRE] 计算节点: 1.准备结点 安装好ubuntu 12.04 Server 64bits后,进入ro ...
- OpenStack Havana 部署在Ubuntu 12.04 Server 【OVS+GRE】(二)——网络节点的安装
序:OpenStack Havana 部署在Ubuntu 12.04 Server [OVS+GRE] 网络节点: 1.安装前更新系统 安装好ubuntu 12.04 Server 64bits后,进 ...
随机推荐
- 《机器学习实战》学习笔记第十一章 —— Apriori算法
主要内容: 一.关联分析 二.Apriori原理 三.使用Apriori算法生成频繁项集 四.从频繁项集中生成关联规则 一.关联分析 1.关联分析是一种在大规模数据集中寻找有趣关系的任务.这些关系可以 ...
- Spring Cloud之Hystrix雪崩效应解决方案
基于Hystris解决雪崩效应: 1.服务降级: 防止用户一直等待,使用降级方式,调用FallBack(返回友好提示,不会去处理请求) 案例: 当前请求人数过多,请稍后重试 2.服务熔断:(和服 ...
- 算法(Algorithms)第4版 练习 1.4.5
a. N b. 1 c. 1 d. N3 e. 1 f. 1 g. 1(0)
- UOJ130 【NOI2015】荷马史诗
本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作. 本文作者:ljh2000 作者博客:http://www.cnblogs.com/ljh2000-jump/ ...
- Python习题-输出一个字符串中最长的子字符串及其长度
描述:有个字符串$sd1#111$svda123!!!221&eSSDSDG,包含特殊字符.数字和字母,输出最长的子字符串和他的长度#例如上面的字符串包含数字字母的字符串是svda123,长度 ...
- 使用 Python 发送短信?
上回食行生鲜签到,我们说到怎么把签到结果发出来,于是就找到了 Twilio. Twilio 是一个位于加利福尼亚的云通信(PaaS)公司,致力于为开发者提供通讯模块的 API.由于 Twilio 为试 ...
- javascript中eval()函数使用方法
本教程主要重介绍eval()函数的语法与使用方法,及在后面我还补充了eval()解析json数据的相关例子,希望文章能帮助到各位深入理解eval()使用方法吧. 前几天说到js中尽量不要使用eva ...
- QT(4)信号与槽
mainWidget.h #ifndef MAINWIDGET_H #define MAINWIDGET_H #include <QWidget> #include <QPushBu ...
- Operating System-Thread(5)弹出式线程&&使单线程代码多线程化会产生那些问题
本文主要内容 弹出式线程(Pop-up threads) 使单线程代码多线程化会产生那些问题 一.弹出式线程(Pop-up threads) 以在一个http到达之后一个Service的处理为例子来介 ...
- Trilead,SSH2的Java调用
最近项目要部署10台设备,如果每台设备都手动进行部署想想也是醉了. 因为之前一直使用SecurityFX以及SecurityCRT,所以考虑是否可以使用基于SSH2的类库来实现文件拷贝以及远程命令调用 ...