Samba Standalone Server on openSUSE 13.1 With tdbsam Backend

This tutorial will describe how to install and configure samba standalone server with tdbsam backend on openSUSE 13.1.

Install Samba with following command:

linux-tm5y:~ # zypper install cups-libs samba
Loading repository data...
Reading installed packages...
'cups-libs' is already installed.
No update candidate for 'cups-libs-1.5.4-12.1.3.i586'. The highest available version is already installed.
Resolving package dependencies...
The following packages are going to be upgraded:
libdcerpc-binding0 libdcerpc0 libgensec0 libndr-krb5pac0 libndr-nbt0 libndr-standard0 libndr0 libnetapi0 libpdb0 libregistry0 libsamba-credentials0
libsamba-hostconfig0 libsamba-util0 libsamdb0 libsmbclient-raw0 libsmbclient0 libsmbconf0 libsmbldap0 libtevent-util0 libwbclient0 samba
samba-client samba-libs
23 packages to upgrade.
Overall download size: 8.5 MiB. After the operation, additional 7.9 KiB will be used.
Continue? [y/n/? shows all options] (y):

Edit /etc/samba/smb.conf  file and make sure you have this in global section.

workgroup = WORKGROUP
passdb backend = tdbsam
security = user
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = P:
usershare allow guests = Yes

Enable and start Samba Service.

linux-tm5y:/etc/samba # /etc/init.d/smb start
redirecting to systemctl start smb
linux-tm5y:/etc/samba # chkconfig smb on

Add common samba shares for all users.

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

Edit users category in samb.conf as shown below.

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

Edit home category in smb.conf as shown below.

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

Restart samba to activate the changes.

linux-tm5y:/etc/samba # /etc/init.d/smb restart
redirecting to systemctl restart smb

Add Unix user pirat9 and add it to group Users.

 useradd -m pirat9 -G users

Set user password.

passwd pirat9
New password:
Retype new password:
passwd: password updated successfully

Make Samba user password.

smbpasswd -a pirat9
New SMB password:
Retype new SMB password:
Added user pirat9.

Check  if  the port samba 445 is  listening.

netstat -an | grep 445
tcp 0 0* LISTEN
tcp 0 0 :::445 :::* LISTEN
linux-tm5y:/etc/samba #

Done!  Lets connect to Samba Server from Windows \\IP\allusers of  \\IP\homes.


Good Luck!