SlideShare a Scribd company logo
CentOS 5.6 Samba Standalone Server With tdbsam Backend

*** may used in Centos 6.0 ***

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Follow me on Twitter
Last edited 04/26/2011

This tutorial explains the installation of a Samba fileserver on CentOS 5.6 and how to configure it to
share files over the SMB protocol as well as how to add users. Samba is configured as a standalone
server, not as a domain controller. In the resulting setup, every user has his own home directory
accessible via the SMB protocol and all users have a shared directory with read-/write access.

I do not issue any guarantee that this will work for you!


1 Preliminary Note

I'm using a CentOS 5.6 system here with the hostname server1.example.com and the IP address
192.168.0.100.

Please make sure that SELinux is disabled and firewall.


Disable SELinux
[root@host2a ~]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX= disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted



Disable Firewall
Setup > firewall > disable firewall.
2 Installing Samba

Check samba install or not. By default not install.

rpm -q samba

Connect to your server on the shell and install the Samba packages:

Server:

yum install samba samba-common

Samba client

yum install samba-client

Time to configure samba server.

I highly recommend backing up your smb.conf file before using Samba. You can do this by issuing the
following command from the directory where your smb.conf file is located:

cd /etc/samba
cp smb.conf smb.conf.original

Edit the smb.conf file:

vi /etc/samba/smb.conf

Make sure you see the following lines in the [global] section:

[...]
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.

        security = user
        passdb backend = tdbsam
[...]

This enables Linux system users to log in to the Samba server.

Then create the system startup links for Samba and start it:

chkconfig --levels 235 smb on
/etc/init.d/smb start
3 Adding Samba Shares

Now I will add a share that is accessible by all users.

Create the directory for sharing the files and change the group to the users group:

mkdir -p /home/shares/allusers
chown -R root:users /home/shares/allusers/
chmod -R ug+rwx,o+rx-w /home/shares/allusers/

At the end of the file /etc/samba/smb.conf add the following lines:

vi /etc/samba/smb.conf


[allusers]
 comment = All Users
 path = /home/shares/allusers
 valid users = @users
 force group = users
 create mask = 0660
 directory mask = 0771
 writable = yes

If you want all users to be able to read and write to their home directories via Samba, add the following
lines to /etc/samba/smb.conf (make sure you comment out or remove the other [homes] section in the
smb.conf file!):


[homes]
  comment = Home Directories
  browseable = no
  valid users = %S
  writable = yes
  create mask = 0700
  directory mask = 0700

Now we restart Samba:

/etc/init.d/smb restart
4 Adding And Managing Users

In this example, I will add a user named tom. You can add as many users as you need in the same way,
just replace the username tom with the desired username in the commands.

useradd tom -m -G users

Set a password for tom in the Linux system user database. If the user tom should not be able to log
into the Linux system, skip this step.

passwd tom

-> Enter the password for the new user.

Now add the user to the Samba user database:

smbpasswd -a tom

-> Enter the password for the new user.

Now you should be able to log in from your Windows workstation with the file explorer (address
is 192.168.0.100 or 192.168.0.100tom for tom's home directory) using the username tom and the
chosen password and store files on the Linux server either in tom's home directory or in the public
shared directory.


5 Links

  Samba: http://www.samba.org/

  CentOS: http://www.centos.org/

CentOS 5.6 Samba Standalone Server With tdbsam Backend

Submitted by falko (Contact Author) (Forums) on Fri, 2011-07-08 13:57. :: CentOS | Samba | Storage
Additional note


Starting the Samba and NetBIOS Name Services on RHEL 6
In order for an RHEL 6 server to operate within a Windows network both the Samba (SMB) and
NetBOIS nameservice (NMB) services must be started. To identify if the services are already running,
the following command may be executed with root privileges in a terminal window:
su –
/sbin/service smb status
smbd is stopped
# /sbin/service nmb status
nmbd is stopped

If the services are reported as currently running and you have made changes to the smb.conf file it will
be necessary to restart the services in order to pick up the changes:
/sbin/service smb restart
/sbin/service nmb restart

If, on the other hand, the services are currently stopped, start them as follows:
/sbin/service smb start
/sbin/service nmb start



Accessing Samba Shares
Now that the Samba resources are configured and the services are running, it is time to access the
shared resource from a Windows system. On a suitable Windows system on the same workgroup as the
RHEL 6 system, open Windows Explorer and navigate to the Network page. At this point, explorer
should search the network and list any systems using the SMB protocol that it finds. The following
figure illustrates an RHEL 6 system named rhel6 located using Windows Explorer on a Windows 7
system:
Double clicking on the RHEL 6 host will prompt for the name and password of a user with access
privileges. In this case it is the demo account that we configured using the smbpasswd tool. Entering
the username and password will result in the shared resources configured for that user appearing the
explorer window, including the tmp resource previously configured:
Double clicking on the tmp shred resource will display a listing of the files and directories contained
therein.


Accessing Windows Shares from RHEL 6
As previously mentioned, Samba is a two way street, allowing not only Windows systems to access
files and printers hosted on an RHEL 6 system, but also allowing the RHEL system to access shared
resources on Windows systems. This is achieved using the samba-client package which is installed by
default under most RHEL 6 configurations. If it is not currently installed, install it from a Terminal
window as follows:
su –
yum install samba-client

To access any shared resources on a Windows system, begin by selecting the Places -> Network
desktop menu option. This will display the Network browser dialog including an icon for the Windows
Network (if one is detected) as illustrated in the following figure:




To obtain a list of Windows workgroups on the network, double click on the Windows Network icon.
From within the list of workgroups double click on the desired group to obtain a listing of servers
available for access:
Finally, double clicking on a computer will list the shared resources available for access from the
RHEL client.


From
http://www.techotopia.com/index.php/Sharing_Files_between_RHEL_6_and_Windows_Systems_with
_Samba
Managing samba using webmin

In centos 5.6 there is GUI : system-config-samba but in centos 6 not have any GUI to manage samba.

Management tool using web browser is call webmin.

Let install and using it.

Download latest rpm for centos form webmin

wget http://www.webmin.com/download.html

install using command

rpm -Uvh webmin.x.x.x.rpm

wait until finish installations

open web browser and point your web browser to samba server port 10000

http://no.ip.sambaserver:10000

login with root acount and password.

More Related Content

What's hot

Presentation on samba server
Presentation on samba serverPresentation on samba server
Presentation on samba server
Veeral Bhateja
 
Rhel4
Rhel4Rhel4
Step by step_linux_guide
Step by step_linux_guideStep by step_linux_guide
Step by step_linux_guide
vinod31dec
 
Presentation on samba server & apache server
Presentation on samba server & apache serverPresentation on samba server & apache server
Presentation on samba server & apache server
Manoz Kumar
 
samba server setup Pts ppt (rohit malav)
samba server setup Pts ppt (rohit malav)samba server setup Pts ppt (rohit malav)
samba server setup Pts ppt (rohit malav)
Rohit malav
 
Samba server linux (SMB) BY ROHIT MALAV
Samba server linux (SMB) BY ROHIT MALAVSamba server linux (SMB) BY ROHIT MALAV
Samba server linux (SMB) BY ROHIT MALAV
Rohit malav
 
Samba power point presentation
Samba power point presentationSamba power point presentation
Samba power point presentation
Md Maksudur Rahman
 
12849144 how-to-install-a-cccam-server-on-windows
12849144 how-to-install-a-cccam-server-on-windows12849144 how-to-install-a-cccam-server-on-windows
12849144 how-to-install-a-cccam-server-on-windows
rajuy2r
 
Ftp server linux
Ftp server linuxFtp server linux
Ftp server linux
Pawan Kumar
 
Linux Based Network Proposal
Linux Based Network ProposalLinux Based Network Proposal
Linux Based Network Proposal
Chris Riccio
 
Samba server in sna
Samba server in snaSamba server in sna
Samba server in sna
aamir lucky
 
SquirrelMail for webmail
SquirrelMail for webmailSquirrelMail for webmail
SquirrelMail for webmail
Aryman Gautam
 
Samba server configuration
Samba server configurationSamba server configuration
Samba server configuration
Thamizharasan P
 
Samba Optimization and Speed Tuning f...
Samba Optimization and Speed Tuning f...Samba Optimization and Speed Tuning f...
Samba Optimization and Speed Tuning f...
wensheng wei
 
Command-Line 101
Command-Line 101Command-Line 101
Command-Line 101
Artefactual Systems - AtoM
 
Printing with cups (linux)
Printing with cups (linux)Printing with cups (linux)
Printing with cups (linux)
Raghu nath
 
linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014
Peter Martin
 
How to run multiple instances of transmission daemon in linux debian or ubuntu
How to run multiple instances of transmission daemon in linux debian or ubuntuHow to run multiple instances of transmission daemon in linux debian or ubuntu
How to run multiple instances of transmission daemon in linux debian or ubuntu
Aditya Gusti Tammam
 
File Sever
File SeverFile Sever
Linux network file system (nfs)
Linux   network file system (nfs)Linux   network file system (nfs)
Linux network file system (nfs)
Raghu nath
 

What's hot (20)

Presentation on samba server
Presentation on samba serverPresentation on samba server
Presentation on samba server
 
Rhel4
Rhel4Rhel4
Rhel4
 
Step by step_linux_guide
Step by step_linux_guideStep by step_linux_guide
Step by step_linux_guide
 
Presentation on samba server & apache server
Presentation on samba server & apache serverPresentation on samba server & apache server
Presentation on samba server & apache server
 
samba server setup Pts ppt (rohit malav)
samba server setup Pts ppt (rohit malav)samba server setup Pts ppt (rohit malav)
samba server setup Pts ppt (rohit malav)
 
Samba server linux (SMB) BY ROHIT MALAV
Samba server linux (SMB) BY ROHIT MALAVSamba server linux (SMB) BY ROHIT MALAV
Samba server linux (SMB) BY ROHIT MALAV
 
Samba power point presentation
Samba power point presentationSamba power point presentation
Samba power point presentation
 
12849144 how-to-install-a-cccam-server-on-windows
12849144 how-to-install-a-cccam-server-on-windows12849144 how-to-install-a-cccam-server-on-windows
12849144 how-to-install-a-cccam-server-on-windows
 
Ftp server linux
Ftp server linuxFtp server linux
Ftp server linux
 
Linux Based Network Proposal
Linux Based Network ProposalLinux Based Network Proposal
Linux Based Network Proposal
 
Samba server in sna
Samba server in snaSamba server in sna
Samba server in sna
 
SquirrelMail for webmail
SquirrelMail for webmailSquirrelMail for webmail
SquirrelMail for webmail
 
Samba server configuration
Samba server configurationSamba server configuration
Samba server configuration
 
Samba Optimization and Speed Tuning f...
Samba Optimization and Speed Tuning f...Samba Optimization and Speed Tuning f...
Samba Optimization and Speed Tuning f...
 
Command-Line 101
Command-Line 101Command-Line 101
Command-Line 101
 
Printing with cups (linux)
Printing with cups (linux)Printing with cups (linux)
Printing with cups (linux)
 
linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014
 
How to run multiple instances of transmission daemon in linux debian or ubuntu
How to run multiple instances of transmission daemon in linux debian or ubuntuHow to run multiple instances of transmission daemon in linux debian or ubuntu
How to run multiple instances of transmission daemon in linux debian or ubuntu
 
File Sever
File SeverFile Sever
File Sever
 
Linux network file system (nfs)
Linux   network file system (nfs)Linux   network file system (nfs)
Linux network file system (nfs)
 

Similar to Samba tutorial

Meeting 9 samba
Meeting 9   sambaMeeting 9   samba
Meeting 9 samba
Syaiful Ahdan
 
Cent os 5.1 - configuring samba 3.0 to use the ads security mode
Cent os 5.1  - configuring samba 3.0 to use the ads security modeCent os 5.1  - configuring samba 3.0 to use the ads security mode
Cent os 5.1 - configuring samba 3.0 to use the ads security mode
B Sasi Kumar
 
Install websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bitsInstall websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bits
Manuel Vega
 
Ansible automation tool with modules
Ansible automation tool with modulesAnsible automation tool with modules
Ansible automation tool with modules
mohamedmoharam
 
Topic # 26 Samba Server.pptx
Topic # 26 Samba Server.pptxTopic # 26 Samba Server.pptx
Topic # 26 Samba Server.pptx
AyeCS11
 
Documentation free nas
Documentation free nasDocumentation free nas
Documentation free nas
Moaaz Magdy
 
Documentation freenas
Documentation freenas Documentation freenas
Documentation freenas
Moaaz Magdy
 
Tutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk WebhostingTutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk Webhosting
Beni Krisbiantoro
 
Unix Administration 2
Unix Administration 2Unix Administration 2
Unix Administration 2
Information Technology
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
Ajaigururaj R
 
Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0
venkatakrishnan k
 
Diva23
Diva23Diva23
Diva23
diva23
 
Sandy Report
Sandy ReportSandy Report
Sandy Report
sandeepkumar907
 
Sandy Report
Sandy ReportSandy Report
Sandy Report
sandeepkumar907
 
Linux
LinuxLinux
55 best linux tips, tricks and command lines
55 best linux tips, tricks and command lines55 best linux tips, tricks and command lines
55 best linux tips, tricks and command lines
Arif Wahyudi
 
Cd rom mounting cdro-ms on solaris
Cd rom mounting cdro-ms on solarisCd rom mounting cdro-ms on solaris
Cd rom mounting cdro-ms on solaris
Bui Van Cuong
 
Dru lavigne servers-tutorial
Dru lavigne servers-tutorialDru lavigne servers-tutorial
Dru lavigne servers-tutorial
Dru Lavigne
 
Ubuntu getting started
Ubuntu getting startedUbuntu getting started
Ubuntu getting started
Ernesto Celis
 
Linux
Linux Linux
Linux
Mindtree
 

Similar to Samba tutorial (20)

Meeting 9 samba
Meeting 9   sambaMeeting 9   samba
Meeting 9 samba
 
Cent os 5.1 - configuring samba 3.0 to use the ads security mode
Cent os 5.1  - configuring samba 3.0 to use the ads security modeCent os 5.1  - configuring samba 3.0 to use the ads security mode
Cent os 5.1 - configuring samba 3.0 to use the ads security mode
 
Install websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bitsInstall websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bits
 
Ansible automation tool with modules
Ansible automation tool with modulesAnsible automation tool with modules
Ansible automation tool with modules
 
Topic # 26 Samba Server.pptx
Topic # 26 Samba Server.pptxTopic # 26 Samba Server.pptx
Topic # 26 Samba Server.pptx
 
Documentation free nas
Documentation free nasDocumentation free nas
Documentation free nas
 
Documentation freenas
Documentation freenas Documentation freenas
Documentation freenas
 
Tutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk WebhostingTutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk Webhosting
 
Unix Administration 2
Unix Administration 2Unix Administration 2
Unix Administration 2
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0
 
Diva23
Diva23Diva23
Diva23
 
Sandy Report
Sandy ReportSandy Report
Sandy Report
 
Sandy Report
Sandy ReportSandy Report
Sandy Report
 
Linux
LinuxLinux
Linux
 
55 best linux tips, tricks and command lines
55 best linux tips, tricks and command lines55 best linux tips, tricks and command lines
55 best linux tips, tricks and command lines
 
Cd rom mounting cdro-ms on solaris
Cd rom mounting cdro-ms on solarisCd rom mounting cdro-ms on solaris
Cd rom mounting cdro-ms on solaris
 
Dru lavigne servers-tutorial
Dru lavigne servers-tutorialDru lavigne servers-tutorial
Dru lavigne servers-tutorial
 
Ubuntu getting started
Ubuntu getting startedUbuntu getting started
Ubuntu getting started
 
Linux
Linux Linux
Linux
 

Recently uploaded

一比一原版美国加州大学欧文分校毕业证(UCI学位证)如何办理
一比一原版美国加州大学欧文分校毕业证(UCI学位证)如何办理一比一原版美国加州大学欧文分校毕业证(UCI学位证)如何办理
一比一原版美国加州大学欧文分校毕业证(UCI学位证)如何办理
02tygie
 
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
9lq7ultg
 
一比一原版美国俄勒冈大学毕业证(UO,UofO学位证)如何办理
一比一原版美国俄勒冈大学毕业证(UO,UofO学位证)如何办理一比一原版美国俄勒冈大学毕业证(UO,UofO学位证)如何办理
一比一原版美国俄勒冈大学毕业证(UO,UofO学位证)如何办理
lyurzi7r
 
一比一原版肯特大学毕业证UKC成绩单一模一样
一比一原版肯特大学毕业证UKC成绩单一模一样一比一原版肯特大学毕业证UKC成绩单一模一样
一比一原版肯特大学毕业证UKC成绩单一模一样
tobbk6s8
 
一比一原版(Rice毕业证)美国莱斯大学毕业证如何办理
一比一原版(Rice毕业证)美国莱斯大学毕业证如何办理一比一原版(Rice毕业证)美国莱斯大学毕业证如何办理
一比一原版(Rice毕业证)美国莱斯大学毕业证如何办理
oabn3692
 
一比一原版亚利桑那大学毕业证(UA毕业证书)如何办理
一比一原版亚利桑那大学毕业证(UA毕业证书)如何办理一比一原版亚利桑那大学毕业证(UA毕业证书)如何办理
一比一原版亚利桑那大学毕业证(UA毕业证书)如何办理
21uul8se
 
一比一原版(UW毕业证书)华盛顿大学毕业证如何办理
一比一原版(UW毕业证书)华盛顿大学毕业证如何办理一比一原版(UW毕业证书)华盛顿大学毕业证如何办理
一比一原版(UW毕业证书)华盛顿大学毕业证如何办理
i990go7o
 
欧洲杯买球-欧洲杯买球买球网好的网站-欧洲杯买球哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
欧洲杯买球-欧洲杯买球买球网好的网站-欧洲杯买球哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】欧洲杯买球-欧洲杯买球买球网好的网站-欧洲杯买球哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
欧洲杯买球-欧洲杯买球买球网好的网站-欧洲杯买球哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
jafiradnan336
 
一比一原版(Hull毕业证)英国哈珀亚当斯大学毕业证如何办理
一比一原版(Hull毕业证)英国哈珀亚当斯大学毕业证如何办理一比一原版(Hull毕业证)英国哈珀亚当斯大学毕业证如何办理
一比一原版(Hull毕业证)英国哈珀亚当斯大学毕业证如何办理
aonx8o5f
 
一比一原版(CSUEB毕业证)美国加州州立大学东湾分校毕业证如何办理
一比一原版(CSUEB毕业证)美国加州州立大学东湾分校毕业证如何办理一比一原版(CSUEB毕业证)美国加州州立大学东湾分校毕业证如何办理
一比一原版(CSUEB毕业证)美国加州州立大学东湾分校毕业证如何办理
stgq9v39
 
一比一原版马来西亚世纪大学毕业证成绩单一模一样
一比一原版马来西亚世纪大学毕业证成绩单一模一样一比一原版马来西亚世纪大学毕业证成绩单一模一样
一比一原版马来西亚世纪大学毕业证成绩单一模一样
k4krdgxx
 
一比一原版(McGill毕业证)加拿大麦吉尔大学毕业证如何办理
一比一原版(McGill毕业证)加拿大麦吉尔大学毕业证如何办理一比一原版(McGill毕业证)加拿大麦吉尔大学毕业证如何办理
一比一原版(McGill毕业证)加拿大麦吉尔大学毕业证如何办理
w26izoeb
 
Plastic Molding Infographic - RPWORLD.pdf
Plastic Molding Infographic - RPWORLD.pdfPlastic Molding Infographic - RPWORLD.pdf
Plastic Molding Infographic - RPWORLD.pdf
RPWORLD Manufacturing
 
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证如何办理一比一原版(LSE毕业证书)伦敦政治经济学院毕业证如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证如何办理
340qn0m1
 
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
f22b6g9c
 
UXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdfUXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdf
anthonylin333
 
一比一原版(KPU毕业证)加拿大昆特兰理工大学毕业证如何办理
一比一原版(KPU毕业证)加拿大昆特兰理工大学毕业证如何办理一比一原版(KPU毕业证)加拿大昆特兰理工大学毕业证如何办理
一比一原版(KPU毕业证)加拿大昆特兰理工大学毕业证如何办理
kmzsy4kn
 
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
67n7f53
 
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
wkip62b
 
一比一原版(Deakin毕业证书)澳洲迪肯大学毕业证文凭如何办理
一比一原版(Deakin毕业证书)澳洲迪肯大学毕业证文凭如何办理一比一原版(Deakin毕业证书)澳洲迪肯大学毕业证文凭如何办理
一比一原版(Deakin毕业证书)澳洲迪肯大学毕业证文凭如何办理
k4krdgxx
 

Recently uploaded (20)

一比一原版美国加州大学欧文分校毕业证(UCI学位证)如何办理
一比一原版美国加州大学欧文分校毕业证(UCI学位证)如何办理一比一原版美国加州大学欧文分校毕业证(UCI学位证)如何办理
一比一原版美国加州大学欧文分校毕业证(UCI学位证)如何办理
 
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
 
一比一原版美国俄勒冈大学毕业证(UO,UofO学位证)如何办理
一比一原版美国俄勒冈大学毕业证(UO,UofO学位证)如何办理一比一原版美国俄勒冈大学毕业证(UO,UofO学位证)如何办理
一比一原版美国俄勒冈大学毕业证(UO,UofO学位证)如何办理
 
一比一原版肯特大学毕业证UKC成绩单一模一样
一比一原版肯特大学毕业证UKC成绩单一模一样一比一原版肯特大学毕业证UKC成绩单一模一样
一比一原版肯特大学毕业证UKC成绩单一模一样
 
一比一原版(Rice毕业证)美国莱斯大学毕业证如何办理
一比一原版(Rice毕业证)美国莱斯大学毕业证如何办理一比一原版(Rice毕业证)美国莱斯大学毕业证如何办理
一比一原版(Rice毕业证)美国莱斯大学毕业证如何办理
 
一比一原版亚利桑那大学毕业证(UA毕业证书)如何办理
一比一原版亚利桑那大学毕业证(UA毕业证书)如何办理一比一原版亚利桑那大学毕业证(UA毕业证书)如何办理
一比一原版亚利桑那大学毕业证(UA毕业证书)如何办理
 
一比一原版(UW毕业证书)华盛顿大学毕业证如何办理
一比一原版(UW毕业证书)华盛顿大学毕业证如何办理一比一原版(UW毕业证书)华盛顿大学毕业证如何办理
一比一原版(UW毕业证书)华盛顿大学毕业证如何办理
 
欧洲杯买球-欧洲杯买球买球网好的网站-欧洲杯买球哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
欧洲杯买球-欧洲杯买球买球网好的网站-欧洲杯买球哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】欧洲杯买球-欧洲杯买球买球网好的网站-欧洲杯买球哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
欧洲杯买球-欧洲杯买球买球网好的网站-欧洲杯买球哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
 
一比一原版(Hull毕业证)英国哈珀亚当斯大学毕业证如何办理
一比一原版(Hull毕业证)英国哈珀亚当斯大学毕业证如何办理一比一原版(Hull毕业证)英国哈珀亚当斯大学毕业证如何办理
一比一原版(Hull毕业证)英国哈珀亚当斯大学毕业证如何办理
 
一比一原版(CSUEB毕业证)美国加州州立大学东湾分校毕业证如何办理
一比一原版(CSUEB毕业证)美国加州州立大学东湾分校毕业证如何办理一比一原版(CSUEB毕业证)美国加州州立大学东湾分校毕业证如何办理
一比一原版(CSUEB毕业证)美国加州州立大学东湾分校毕业证如何办理
 
一比一原版马来西亚世纪大学毕业证成绩单一模一样
一比一原版马来西亚世纪大学毕业证成绩单一模一样一比一原版马来西亚世纪大学毕业证成绩单一模一样
一比一原版马来西亚世纪大学毕业证成绩单一模一样
 
一比一原版(McGill毕业证)加拿大麦吉尔大学毕业证如何办理
一比一原版(McGill毕业证)加拿大麦吉尔大学毕业证如何办理一比一原版(McGill毕业证)加拿大麦吉尔大学毕业证如何办理
一比一原版(McGill毕业证)加拿大麦吉尔大学毕业证如何办理
 
Plastic Molding Infographic - RPWORLD.pdf
Plastic Molding Infographic - RPWORLD.pdfPlastic Molding Infographic - RPWORLD.pdf
Plastic Molding Infographic - RPWORLD.pdf
 
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证如何办理一比一原版(LSE毕业证书)伦敦政治经济学院毕业证如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证如何办理
 
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
 
UXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdfUXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdf
 
一比一原版(KPU毕业证)加拿大昆特兰理工大学毕业证如何办理
一比一原版(KPU毕业证)加拿大昆特兰理工大学毕业证如何办理一比一原版(KPU毕业证)加拿大昆特兰理工大学毕业证如何办理
一比一原版(KPU毕业证)加拿大昆特兰理工大学毕业证如何办理
 
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
 
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
 
一比一原版(Deakin毕业证书)澳洲迪肯大学毕业证文凭如何办理
一比一原版(Deakin毕业证书)澳洲迪肯大学毕业证文凭如何办理一比一原版(Deakin毕业证书)澳洲迪肯大学毕业证文凭如何办理
一比一原版(Deakin毕业证书)澳洲迪肯大学毕业证文凭如何办理
 

Samba tutorial

  • 1. CentOS 5.6 Samba Standalone Server With tdbsam Backend *** may used in Centos 6.0 *** Version 1.0 Author: Falko Timme <ft [at] falkotimme [dot] com> Follow me on Twitter Last edited 04/26/2011 This tutorial explains the installation of a Samba fileserver on CentOS 5.6 and how to configure it to share files over the SMB protocol as well as how to add users. Samba is configured as a standalone server, not as a domain controller. In the resulting setup, every user has his own home directory accessible via the SMB protocol and all users have a shared directory with read-/write access. I do not issue any guarantee that this will work for you! 1 Preliminary Note I'm using a CentOS 5.6 system here with the hostname server1.example.com and the IP address 192.168.0.100. Please make sure that SELinux is disabled and firewall. Disable SELinux [root@host2a ~]# cat /etc/sysconfig/selinux # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - SELinux is fully disabled. SELINUX= disabled # SELINUXTYPE= type of policy in use. Possible values are: # targeted - Only targeted network daemons are protected. # strict - Full SELinux protection. SELINUXTYPE=targeted Disable Firewall Setup > firewall > disable firewall.
  • 2. 2 Installing Samba Check samba install or not. By default not install. rpm -q samba Connect to your server on the shell and install the Samba packages: Server: yum install samba samba-common Samba client yum install samba-client Time to configure samba server. I highly recommend backing up your smb.conf file before using Samba. You can do this by issuing the following command from the directory where your smb.conf file is located: cd /etc/samba cp smb.conf smb.conf.original Edit the smb.conf file: vi /etc/samba/smb.conf Make sure you see the following lines in the [global] section: [...] # Backend to store user information in. New installations should # use either tdbsam or ldapsam. smbpasswd is available for backwards # compatibility. tdbsam requires no further configuration. security = user passdb backend = tdbsam [...] This enables Linux system users to log in to the Samba server. Then create the system startup links for Samba and start it: chkconfig --levels 235 smb on /etc/init.d/smb start
  • 3. 3 Adding Samba Shares Now I will add a share that is accessible by all users. Create the directory for sharing the files and change the group to the users group: mkdir -p /home/shares/allusers chown -R root:users /home/shares/allusers/ chmod -R ug+rwx,o+rx-w /home/shares/allusers/ At the end of the file /etc/samba/smb.conf add the following lines: vi /etc/samba/smb.conf [allusers] comment = All Users path = /home/shares/allusers valid users = @users force group = users create mask = 0660 directory mask = 0771 writable = yes If you want all users to be able to read and write to their home directories via Samba, add the following lines to /etc/samba/smb.conf (make sure you comment out or remove the other [homes] section in the smb.conf file!): [homes] comment = Home Directories browseable = no valid users = %S writable = yes create mask = 0700 directory mask = 0700 Now we restart Samba: /etc/init.d/smb restart
  • 4. 4 Adding And Managing Users In this example, I will add a user named tom. You can add as many users as you need in the same way, just replace the username tom with the desired username in the commands. useradd tom -m -G users Set a password for tom in the Linux system user database. If the user tom should not be able to log into the Linux system, skip this step. passwd tom -> Enter the password for the new user. Now add the user to the Samba user database: smbpasswd -a tom -> Enter the password for the new user. Now you should be able to log in from your Windows workstation with the file explorer (address is 192.168.0.100 or 192.168.0.100tom for tom's home directory) using the username tom and the chosen password and store files on the Linux server either in tom's home directory or in the public shared directory. 5 Links Samba: http://www.samba.org/ CentOS: http://www.centos.org/ CentOS 5.6 Samba Standalone Server With tdbsam Backend Submitted by falko (Contact Author) (Forums) on Fri, 2011-07-08 13:57. :: CentOS | Samba | Storage
  • 5. Additional note Starting the Samba and NetBIOS Name Services on RHEL 6 In order for an RHEL 6 server to operate within a Windows network both the Samba (SMB) and NetBOIS nameservice (NMB) services must be started. To identify if the services are already running, the following command may be executed with root privileges in a terminal window: su – /sbin/service smb status smbd is stopped # /sbin/service nmb status nmbd is stopped If the services are reported as currently running and you have made changes to the smb.conf file it will be necessary to restart the services in order to pick up the changes: /sbin/service smb restart /sbin/service nmb restart If, on the other hand, the services are currently stopped, start them as follows: /sbin/service smb start /sbin/service nmb start Accessing Samba Shares Now that the Samba resources are configured and the services are running, it is time to access the shared resource from a Windows system. On a suitable Windows system on the same workgroup as the RHEL 6 system, open Windows Explorer and navigate to the Network page. At this point, explorer should search the network and list any systems using the SMB protocol that it finds. The following figure illustrates an RHEL 6 system named rhel6 located using Windows Explorer on a Windows 7 system:
  • 6. Double clicking on the RHEL 6 host will prompt for the name and password of a user with access privileges. In this case it is the demo account that we configured using the smbpasswd tool. Entering the username and password will result in the shared resources configured for that user appearing the explorer window, including the tmp resource previously configured:
  • 7. Double clicking on the tmp shred resource will display a listing of the files and directories contained therein. Accessing Windows Shares from RHEL 6 As previously mentioned, Samba is a two way street, allowing not only Windows systems to access files and printers hosted on an RHEL 6 system, but also allowing the RHEL system to access shared resources on Windows systems. This is achieved using the samba-client package which is installed by default under most RHEL 6 configurations. If it is not currently installed, install it from a Terminal window as follows: su – yum install samba-client To access any shared resources on a Windows system, begin by selecting the Places -> Network desktop menu option. This will display the Network browser dialog including an icon for the Windows Network (if one is detected) as illustrated in the following figure: To obtain a list of Windows workgroups on the network, double click on the Windows Network icon. From within the list of workgroups double click on the desired group to obtain a listing of servers available for access:
  • 8. Finally, double clicking on a computer will list the shared resources available for access from the RHEL client. From http://www.techotopia.com/index.php/Sharing_Files_between_RHEL_6_and_Windows_Systems_with _Samba
  • 9. Managing samba using webmin In centos 5.6 there is GUI : system-config-samba but in centos 6 not have any GUI to manage samba. Management tool using web browser is call webmin. Let install and using it. Download latest rpm for centos form webmin wget http://www.webmin.com/download.html install using command rpm -Uvh webmin.x.x.x.rpm wait until finish installations open web browser and point your web browser to samba server port 10000 http://no.ip.sambaserver:10000 login with root acount and password.