How to install the Samba server on Ubuntu 12.04

Source: Internet
Author: User

Part 1:configuring anonymous share with Samba server

To install the Samba package,enter the following command:

sudo 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 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'll 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/sudorm /etc/samba/sudo Touch /etc/samba/sudo nano/etc/samba/smb.conf

Add this, in your smb.conf file (or change it according to your requirement):

#======================= Global Settings ===================================== [global]workgroup = WORKGROUPserver string = Samba Server%vnetbios name = Ubuntusecurity = UserMap to guest = bad Userdns proxy = no#======================== = = = Share definitions ============================== [Myshare]path =/samba/share browsable =yeswritable = yesguest OK = Yesread 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 is 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-a-the-all can read and write it (Check it, that it's allowed in your environment or not):

sudo chmod 0777 Share ls -l

Try to create something again, inside the share folder:

Verify the newly created file on Samba server:

CD share/ls

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/sudochownls -sudochmod0770 secure/ls -lsudo  adduser arbab smbgrpsudo 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:

sudosudo testparm

Testing from Windows machine:

Verification from Ubuntu Server:

cd/samba/secure/ls -l

Hope this would help you!

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 the Samba server on Ubuntu 12.04

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.