CentOS 5.

3 Samba Standalone Server With tdbsam Backend

By Falko Timme Published: 2009-07-03 12:52

CentOS 5.3 Samba Standalone Server With tdbsam Backend
Version 1.0 Author: Falko Timme <ft [at] falkotimme [dot] com> Last edited 04/20/2009 This tutorial explains the installation of a Samba fileserver on CentOS 5.3 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.3 system here with the hostname server1.example.com and the IP address Please make sure that SELinux is disabled as shown in chapter 6 of this tutorial: The Perfect Server - CentOS 5.3 x86_64 [ISPConfig 2] - Page 3

2 Installing Samba
Connect to your server on the shell and install the Samba packages:
yum install cups-libs samba samba-common

Edit the smb.conf file:
vi /etc/samba/smb.conf

Copyright © 2010 All Rights Reserved.


Page 1 of 4

. HowtoForge Page 2 of 4 .howtoforge. tdbsam requires no further configuration.] This enables Linux system users to log in to the Samba server.o+rx-w /home/shares/allusers/ Copyright © 2010 All Rights Reserved. New installations should # use either tdbsam or ldapsam.3 Samba Standalone Server With tdbsam Backend http://www.] # Backend to store user information in. security = user passdb backend = tdbsam [. 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. Then create the system startup links for Samba and start it: chkconfig --levels 235 smb on /etc/init... smbpasswd is available for backwards # compatibility.d/smb start 3 Adding Samba Shares Now I will add a share that is accessible by all users.CentOS 5..com/ Make sure you see the following lines in the [global] section: [.

CentOS 5..conf (make sure you comment out or remove the other [homes] section in the smb.conf [.] [homes] comment = Home Directories browseable = no valid users = %S writable = yes create mask = 0700 directory mask = 0700 Now we restart Samba: Copyright © 2010 All Rights Reserved.howtoforge. add the following lines to /etc/samba/smb.conf file!): [.3 Samba Standalone Server With tdbsam Backend http://www...conf add the following lines: vi /etc/samba/smb..] [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.com/ At the end of the file /etc/samba/smb. HowtoForge Page 3 of 4 .

Now you should be able to log in from your Windows workstation with the file explorer (address is \192.0.com/ 4 Adding And Managing Users In this example. just replace the username tom with the desired username in the commands.Samba: http://www. 5 Links .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. passwd tom -> Enter the password for the new user. You can add as many users as you need in the same way. I will add a user named tom. If the user tom should not be able to log into the Linux system. HowtoForge Page 4 of 4 .CentOS: http://www.org/ .0.100 or \192.168.d/smb restart http://www.org/ Copyright © 2010 All Rights Reserved.168.howtoforge.3 Samba Standalone Server With tdbsam Backend /etc/init. useradd tom -m -G users Set a password for tom in the Linux system user database.CentOS 5.samba. skip this step. Now add the user to the Samba user database: smbpasswd -a tom -> Enter the password for the new user.centos.

Sign up to vote on this title
UsefulNot useful