Upload
alan-smill
View
252
Download
1
Embed Size (px)
Citation preview
8/12/2019 Samba Server - Ubuntu Server 12.04
1/28
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
29 CommentsPosted byrbgeekon April 25, 2012
Part 1: Configuring anonymous share with samba server
To install the sambapackage,enter the following command:
sudo apt-get install samba samba-common
Check the version of installed samba software by using this command:
smbd --version
http://rbgeek.wordpress.com/2012/04/25/how-to-install-samba-server-on-ubuntu-12-04/http://rbgeek.wordpress.com/2012/04/25/how-to-install-samba-server-on-ubuntu-12-04/http://rbgeek.wordpress.com/2012/04/25/how-to-install-samba-server-on-ubuntu-12-04/http://rbgeek.wordpress.com/2012/04/25/how-to-install-samba-server-on-ubuntu-12-04/#respondhttp://rbgeek.wordpress.com/2012/04/25/how-to-install-samba-server-on-ubuntu-12-04/#respondhttp://rbgeek.wordpress.com/author/rbgeek/http://rbgeek.wordpress.com/author/rbgeek/http://rbgeek.wordpress.com/author/rbgeek/http://rbgeek.files.wordpress.com/2012/04/15.jpghttp://rbgeek.wordpress.com/author/rbgeek/http://rbgeek.wordpress.com/2012/04/25/how-to-install-samba-server-on-ubuntu-12-04/#respondhttp://rbgeek.wordpress.com/2012/04/25/how-to-install-samba-server-on-ubuntu-12-04/http://rbgeek.wordpress.com/2012/04/25/how-to-install-samba-server-on-ubuntu-12-04/8/12/2019 Samba Server - Ubuntu Server 12.04
2/28
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:
http://rbgeek.files.wordpress.com/2012/04/44.jpghttp://rbgeek.files.wordpress.com/2012/04/34.jpghttp://rbgeek.files.wordpress.com/2012/04/24.jpghttp://rbgeek.files.wordpress.com/2012/04/44.jpghttp://rbgeek.files.wordpress.com/2012/04/34.jpghttp://rbgeek.files.wordpress.com/2012/04/24.jpghttp://rbgeek.files.wordpress.com/2012/04/44.jpghttp://rbgeek.files.wordpress.com/2012/04/34.jpghttp://rbgeek.files.wordpress.com/2012/04/24.jpg8/12/2019 Samba Server - Ubuntu Server 12.04
3/28
8/12/2019 Samba Server - Ubuntu Server 12.04
4/28
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):
http://rbgeek.files.wordpress.com/2012/04/res.jpghttp://rbgeek.files.wordpress.com/2012/04/6a.jpghttp://rbgeek.files.wordpress.com/2012/04/res.jpghttp://rbgeek.files.wordpress.com/2012/04/6a.jpg8/12/2019 Samba Server - Ubuntu Server 12.04
5/28
wao, we are able to access the samba share successfully
Lets try to create something, inside the share folder:
http://rbgeek.files.wordpress.com/2012/04/83.jpghttp://rbgeek.files.wordpress.com/2012/04/73.jpghttp://rbgeek.files.wordpress.com/2012/04/83.jpghttp://rbgeek.files.wordpress.com/2012/04/73.jpghttp://rbgeek.files.wordpress.com/2012/04/83.jpghttp://rbgeek.files.wordpress.com/2012/04/73.jpg8/12/2019 Samba Server - Ubuntu Server 12.04
6/28
Error, we cannot create anything inside the share folder
http://rbgeek.files.wordpress.com/2012/04/101.jpghttp://rbgeek.files.wordpress.com/2012/04/91.jpghttp://rbgeek.files.wordpress.com/2012/04/101.jpghttp://rbgeek.files.wordpress.com/2012/04/91.jpghttp://rbgeek.files.wordpress.com/2012/04/101.jpghttp://rbgeek.files.wordpress.com/2012/04/91.jpg8/12/2019 Samba Server - Ubuntu Server 12.04
7/28
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 inyour environment or not):
sudo chmod -R 0777 share
ls -l
Try to create something again, inside the share folder:
http://rbgeek.files.wordpress.com/2012/04/121.jpghttp://rbgeek.files.wordpress.com/2012/04/112.jpghttp://rbgeek.files.wordpress.com/2012/04/121.jpghttp://rbgeek.files.wordpress.com/2012/04/112.jpg8/12/2019 Samba Server - Ubuntu Server 12.04
8/28
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
http://rbgeek.files.wordpress.com/2012/04/141.jpghttp://rbgeek.files.wordpress.com/2012/04/131.jpghttp://rbgeek.files.wordpress.com/2012/04/141.jpghttp://rbgeek.files.wordpress.com/2012/04/131.jpg8/12/2019 Samba Server - Ubuntu Server 12.04
9/28
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 0770 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
http://rbgeek.files.wordpress.com/2012/04/162.jpghttp://rbgeek.files.wordpress.com/2012/04/151.jpghttp://rbgeek.files.wordpress.com/2012/04/162.jpghttp://rbgeek.files.wordpress.com/2012/04/151.jpg8/12/2019 Samba Server - Ubuntu Server 12.04
10/28
browsable = yes
Restart the samba service and check the syntax error with testparm:
sudo service smbd restart
sudo testparm
http://rbgeek.files.wordpress.com/2012/04/17.jpg8/12/2019 Samba Server - Ubuntu Server 12.04
11/28
Testing from Windows Machine:
http://rbgeek.files.wordpress.com/2012/04/18.jpg8/12/2019 Samba Server - Ubuntu Server 12.04
12/28
http://rbgeek.files.wordpress.com/2012/04/20.jpghttp://rbgeek.files.wordpress.com/2012/04/19.jpghttp://rbgeek.files.wordpress.com/2012/04/20.jpghttp://rbgeek.files.wordpress.com/2012/04/19.jpg8/12/2019 Samba Server - Ubuntu Server 12.04
13/28
Verification from Ubuntu server:
cd /samba/secure/
ls -l
http://rbgeek.files.wordpress.com/2012/04/211.jpg8/12/2019 Samba Server - Ubuntu Server 12.04
14/28
Hope this will help you!
Please Remember me in your prayers!
Enjoy
http://rbgeek.files.wordpress.com/2012/04/221.jpghttp://rbgeek.files.wordpress.com/2012/04/221.jpg8/12/2019 Samba Server - Ubuntu Server 12.04
15/28
http://ubuntuserverguide.com/2012/06/install-samba-server-ubuntu-server-1204-lts.html
Install and Configure Samba Server as File Server on Ubuntu Server
12.04
inFile Server,How To,Samba Server
Samba serveris best option for sharing files between Ubuntu dan Windows Computer. Samba isa free and open source application re-implementation of SMB/CIFS networking protocol,
originally developed by Australian Andrew Tridgell. As of version 3,samba can be used as file
and print services between Linux and Windows-Based clients.
Following tutorial is on How to Install Samba Server in Ubuntu Server 12.04 LTS in order to
share files with Windows-based clients
Install Samba Server
Log in or ubuntuserver,thenn Install the samba package in ubuntuserver with followingcommads:
sudo apt-get instal samba smbfs
Now,samba serverready to configure as file server
Configure Samba Server as File Server
To make samba as file server, edit and configure Samba configuration file, it place on directory
/etc/samba/smb.conf. Before editing samba configuration, Make a backup ofyour/etc/samba/smb.conf.
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.original
Replace/Edit options /etc/samba/smb.conf with following configuration below
[global]workgroup = Ubuntu Precisesecurity = user
[homes]comment = Home Directories
browseable = yeswritable = yes[share]comment = Precise File Server
path = /srv/samba/sharebrowsable = yesguest ok = no
http://ubuntuserverguide.com/2012/06/install-samba-server-ubuntu-server-1204-lts.htmlhttp://ubuntuserverguide.com/2012/06/install-samba-server-ubuntu-server-1204-lts.htmlhttp://ubuntuserverguide.com/category/ubuntu-server/file-serverhttp://ubuntuserverguide.com/category/ubuntu-server/file-serverhttp://ubuntuserverguide.com/category/ubuntu-server/file-serverhttp://ubuntuserverguide.com/category/how-tohttp://ubuntuserverguide.com/category/how-tohttp://ubuntuserverguide.com/category/how-tohttp://ubuntuserverguide.com/category/ubuntu-server/samba-serverhttp://ubuntuserverguide.com/category/ubuntu-server/samba-serverhttp://ubuntuserverguide.com/category/ubuntu-server/samba-serverhttp://ubuntuserverguide.com/2012/10/how-to-install-and-configure-swat-samba-web-administration-tool-on-ubuntu-server-12-04.htmlhttp://ubuntuserverguide.com/2012/10/how-to-install-and-configure-swat-samba-web-administration-tool-on-ubuntu-server-12-04.htmlhttp://ubuntuserverguide.com/2012/10/how-to-install-and-configure-swat-samba-web-administration-tool-on-ubuntu-server-12-04.htmlhttp://ubuntuserverguide.com/2012/11/how-to-instal-zentyal-3-0-on-ubuntu-server-12-04-lts.htmlhttp://ubuntuserverguide.com/2012/11/how-to-instal-zentyal-3-0-on-ubuntu-server-12-04-lts.htmlhttp://ubuntuserverguide.com/2012/11/how-to-instal-zentyal-3-0-on-ubuntu-server-12-04-lts.htmlhttp://ubuntuserverguide.com/2012/10/how-to-install-and-configure-swat-samba-web-administration-tool-on-ubuntu-server-12-04.htmlhttp://ubuntuserverguide.com/2012/10/how-to-install-and-configure-swat-samba-web-administration-tool-on-ubuntu-server-12-04.htmlhttp://ubuntuserverguide.com/2012/10/how-to-install-and-configure-swat-samba-web-administration-tool-on-ubuntu-server-12-04.htmlhttp://ubuntuserverguide.com/2012/10/how-to-install-and-configure-swat-samba-web-administration-tool-on-ubuntu-server-12-04.htmlhttp://ubuntuserverguide.com/2012/11/how-to-instal-zentyal-3-0-on-ubuntu-server-12-04-lts.htmlhttp://ubuntuserverguide.com/2012/11/how-to-instal-zentyal-3-0-on-ubuntu-server-12-04-lts.htmlhttp://ubuntuserverguide.com/2012/11/how-to-instal-zentyal-3-0-on-ubuntu-server-12-04-lts.htmlhttp://ubuntuserverguide.com/2012/10/how-to-install-and-configure-swat-samba-web-administration-tool-on-ubuntu-server-12-04.htmlhttp://ubuntuserverguide.com/2012/10/how-to-install-and-configure-swat-samba-web-administration-tool-on-ubuntu-server-12-04.htmlhttp://ubuntuserverguide.com/category/ubuntu-server/samba-serverhttp://ubuntuserverguide.com/category/how-tohttp://ubuntuserverguide.com/category/ubuntu-server/file-serverhttp://ubuntuserverguide.com/2012/06/install-samba-server-ubuntu-server-1204-lts.html8/12/2019 Samba Server - Ubuntu Server 12.04
16/28
read only = nocreate mask = 0755
Create directory for file sharing
sudo mkdir -p /srv/samba/share/
sudo chown nobody.nogroup /srv/samba/share/
create a samba user with following command
sudo adduser precise
Create a samba password for user: precise
sudo smbpasswd -a precise
Tips:if you want convert ubuntu user as samba user, just type the command : sudo smbpasswd -
a
Now, restart samba server with following command
sudo /etc/init.d/smbd restart
How to Connect Samba Server on Ubuntu and Windows XP
To Connect samba server on ubuntu : Open nautilus MenuFileConnect to Server
8/12/2019 Samba Server - Ubuntu Server 12.04
17/28
Access [share] directory
http://ubuntuserverguide.com/wp-content/uploads/2012/06/Connect-to-share-directory-Samba-server-ubuntu-server.png8/12/2019 Samba Server - Ubuntu Server 12.04
18/28
Connect to [Homes] Directory
To Connect samba server on Windows XP: StartRunorpress Windows Button + R . see
screen shoot below
http://ubuntuserverguide.com/wp-content/uploads/2012/06/Connect-to-Home-Directory-Samba-server-ubuntu-server.png8/12/2019 Samba Server - Ubuntu Server 12.04
19/28
http://www.unixmen.com/howto-install-and-configure-samba-share-in-ubuntu/
http://www.unixmen.com/howto-install-and-configure-samba-share-in-ubuntu/http://www.unixmen.com/howto-install-and-configure-samba-share-in-ubuntu/http://ubuntuserverguide.com/wp-content/uploads/2012/06/Access-samba-server-on-windows-xp.pnghttp://www.unixmen.com/howto-install-and-configure-samba-share-in-ubuntu/8/12/2019 Samba Server - Ubuntu Server 12.04
20/28
Install and Configure Samba share in Ubuntu 13.04 Raring Ringtail ,
12.10, 12.04| Howto
Written byMel Khamon March 11, 2012. Posted inLinux tutorials,Ubuntu
13EmailShare
Updated 05-04-2013: One of the most asked features for Samba is a graphical user interfaceto
help with configuration and management, there are several GUI interfaces to Samba available,for me the most simple and powerful one of these tools issamba server configuration tool. In
this post, i will show you how to install and configure samba in Ubuntu 12.10 and 13.04 RaringRingtail, this work also for previous releases of Ubuntu.
Check also our previous post oninstallation and configuration of samba via command line.
Installing Samba on Ubuntu:
1- Install Samba files
First thing we need to do is to install samba, go to Software center in Ubuntu and search forsamba then install the package. If you want to install it via terminal then copy this command :
sudo apt-get install samba samba-common
2-Install some dependencies for Configuration tools (don`t forget to install python-glade2)
sudo apt-get install python-glade2
3- Installing Samba Server configuration Tool :
Now install the graphical interface System-config samba
sudo apt-get install system-config-samba
4-Add a Linux/Unix user:
adduser pirat9
http://www.unixmen.com/author/pirat9/http://www.unixmen.com/author/pirat9/http://www.unixmen.com/author/pirat9/http://www.unixmen.com/category/linux-tutorials/http://www.unixmen.com/category/linux-tutorials/http://www.unixmen.com/category/linux-tutorials/http://www.unixmen.com/category/linux-distributions/ubuntu/http://www.unixmen.com/category/linux-distributions/ubuntu/http://www.unixmen.com/category/linux-distributions/ubuntu/http://www.unixmen.com/install-samba-server-in-ubuntu-karmic/http://www.unixmen.com/install-samba-server-in-ubuntu-karmic/http://www.unixmen.com/install-samba-server-in-ubuntu-karmic/http://www.unixmen.com/install-samba-server-in-ubuntu-karmic/http://www.unixmen.com/category/linux-distributions/ubuntu/http://www.unixmen.com/category/linux-tutorials/http://www.unixmen.com/author/pirat9/8/12/2019 Samba Server - Ubuntu Server 12.04
21/28
5- Make a Linux/Unix password for user pirat9
passwd pirat9
6- Now open samba configuration tool.
7- Add the folder you want to share and setup the permissions access.
http://180016988.r.cdn77.net/wp-content/uploads/2012/03/samba1.png8/12/2019 Samba Server - Ubuntu Server 12.04
22/28
- Setup the permissions access
http://180016988.r.cdn77.net/wp-content/uploads/2012/03/Screenshot-at-2012-03-06-211403.png8/12/2019 Samba Server - Ubuntu Server 12.04
23/28
8- Now before to connect to the share, you have to create the samba user :
sudo smbpasswd -a pirat9
New SMB passwordretype New SMB Password
Now the configuration is done.
Tip:You can chose any directory you want to share by right click on the folder directory andopen the share options
http://180016988.r.cdn77.net/wp-content/uploads/2012/03/Screenshot-at-2012-03-06-211428.png8/12/2019 Samba Server - Ubuntu Server 12.04
24/28
And activate share:
http://180016988.r.cdn77.net/wp-content/uploads/2012/03/samba2.png8/12/2019 Samba Server - Ubuntu Server 12.04
25/28
9- Now, let`s test if samba share is working from another Linux Machine, in my case will try to
connect from LinuxMint12 machine to Ubuntu 12.04 machine where we just installed samba,
from menu open connect to server and type the details of your Ubuntu machine
http://180016988.r.cdn77.net/wp-content/uploads/2012/03/samba3.png8/12/2019 Samba Server - Ubuntu Server 12.04
26/28
http://180016988.r.cdn77.net/wp-content/uploads/2012/03/Screenshot-at-2012-03-06-213759.pnghttp://180016988.r.cdn77.net/wp-content/uploads/2012/03/Screenshot-at-2012-03-06-213437.pnghttp://180016988.r.cdn77.net/wp-content/uploads/2012/03/Screenshot-at-2012-03-06-213759.pnghttp://180016988.r.cdn77.net/wp-content/uploads/2012/03/Screenshot-at-2012-03-06-213437.png8/12/2019 Samba Server - Ubuntu Server 12.04
27/28
12- Connect from windows (XP/Vista/7)
http://180016988.r.cdn77.net/wp-content/uploads/2012/03/Screenshot-at-2012-03-06-215353.pnghttp://180016988.r.cdn77.net/wp-content/uploads/2012/03/Screenshot-at-2012-03-06-213847.pnghttp://180016988.r.cdn77.net/wp-content/uploads/2012/03/Screenshot-at-2012-03-06-215353.pnghttp://180016988.r.cdn77.net/wp-content/uploads/2012/03/Screenshot-at-2012-03-06-213847.png8/12/2019 Samba Server - Ubuntu Server 12.04
28/28
- See more at: http://www.unixmen.com/howto-install-and-configure-samba-share-in-
ubuntu/#sthash.qikJJXxu.dpuf
http://180016988.r.cdn77.net/wp-content/uploads/2012/03/Screenshot-at-2012-03-06-215504.png