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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. Install eclipse ns3 in ubuntu 14.04

    1. NS3 install 参考NS3 tutorial即可. 2.eclipse 2.1下载 下载地址:http://www.eclipse.org/downloads/              ...

  4. Ubuntu 12.04安装Adobe Reader

    原本从Adobe 官方网站下载了 Adobe Reader, 是个rpm包,先用agt-get 装了rpm(sudo apt-get install rpm), 一安装(rpm -ivh AdobeR ...

  5. 【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 ...

  6. 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 ...

  7. 在Ubuntu 12.04安装和设置Samba实现网上邻居共享

    转载:http://www.startos.com/ubuntu/tips/2012031333097.html          有微小改动. Samba 是一款功能强大的共享工具,可以实现与win ...

  8. OpenStack Havana 部署在Ubuntu 12.04 Server 【OVS+GRE】(三)——计算节点的安装

    序:OpenStack Havana 部署在Ubuntu 12.04 Server [OVS+GRE] 计算节点: 1.准备结点 安装好ubuntu 12.04 Server 64bits后,进入ro ...

  9. OpenStack Havana 部署在Ubuntu 12.04 Server 【OVS+GRE】(二)——网络节点的安装

    序:OpenStack Havana 部署在Ubuntu 12.04 Server [OVS+GRE] 网络节点: 1.安装前更新系统 安装好ubuntu 12.04 Server 64bits后,进 ...

随机推荐

  1. Delphi 函数的重载和作用域

    1.在delphi 中,我们可以使用相同的函数名来调用不同的函数,我们称这个函数为重载,函数的参数类型和参数的个数可以不同,用到的关键字overload:格式如下: function addInt(x ...

  2. Jquery的load()

    我一直认为jquery的load函数是以GET方式请求另一个文件并加载到当前DOM里的.当我带参数加载一个ASP脚本时是这样做: $("#showData").load(" ...

  3. springmvc对象映射个数超过256个

    /** 由于Spring在接受前台传入的List时,就会出现256的IndexOutOfBoundsException异常 设置setAutoGrowCollectionLimit为1024 @par ...

  4. 分享知识-快乐自己:HBase编程

    HBase编程: 一):大数据(hadoop)初始化环境搭建 二):大数据(hadoop)环境搭建 三):运行wordcount案例 四):揭秘HDFS 五):揭秘MapReduce 六):揭秘HBa ...

  5. 用截取的部分图像创建新图像--关于cvGetSubRect,cvGetImage的用法

    CvMat* cvGetSubRect(const CvArr* arr, CvMat* submat, CvRect rect)可以把截取图像中需要的区域存入矩阵.把IplImage *传给arr, ...

  6. 【leetcode刷题笔记】Valid Palindrome

    Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignori ...

  7. Qt Quick中的信号与槽

    在QML中,在Qt Quick中,要想妥善地处理各种事件,肯定离不开信号与槽,本博的主要内容就是整理Qt 中的信号与槽的内容. 1. 链接QML类型的已知信号 QML中已有类型定义的信号分为两类:一类 ...

  8. ACM学习历程—ZOJ3785 What day is that day?(数论)

    Description It's Saturday today, what day is it after 11 + 22 + 33 + ... + NN days? Input There are ...

  9. MongoDB3.2.8创建初始用户

    启动MongoDB前需要关闭配置文件中的auth选项,否则不能创建用户 首先创建用户管理用户 use admin db.createUser({user:'admin',pwd:'123456', r ...

  10. binlog配置和使用

    binlog启用和禁用在/etc/my.cnf文件中添加log-bin=mysql-bin来启用binlog,mysql-bin为日志文件名前缀.如果用户有super权限,可通过set sql_log ...