Howto install and configure Samba Server on Fedora 18

Howto install and configure Samba Server on Fedora 18
samba server fedora-18-spherical-cow1

 

1. Install samba package:

[root@dhcppc2 ~]# yum -y install samba samba-client samba-common
Loaded plugins: langpacks, presto, refresh-packagekit
fedora/18/i386/metalink | 8.5 kB 00:00
updates/18/i386/metalink | 16 kB 00:00
updates | 4.6 kB 00:00
updates/primary_db | 6.7 MB 04:28
Resolving Dependencies
–> Running transaction check
—> Package samba.i686 2:4.0.3-2.fc18 will be installed
–> Processing Dependency: samba-libs = 2:4.0.3-2.fc18 for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libxattr_tdb.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libutil_tdb.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libutil_reg.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libsmbregistry.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libsmbd_shim.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libsmbd_base.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libsmb_transport.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libsecrets3.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libsamba3-util.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libsamba-sockets.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libsamba-security.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libndr-samba.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: liblibsmb.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libgse.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: liberrors.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libdbwrap.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libcliauth.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libcli_smb_common.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libcli_cldap.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libcli-nbt.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libauth.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
–> Processing Dependency: libCHARSET3.so(SAMBA_4.0.3) for package: 2:samba-4.0.3-2.fc18.i686
—> Package samba-client.i686 2:4.0.0-168.fc18.rc5 will be updated
—> Package samba-client.i686 2:4.0.3-2.fc18 will be an update
—> Package samba-common.i686 2:4.0.0-168.fc18.rc5 will be updated
–> Processing Dependency: samba-common = 2:4.0.0-168.fc18.rc5 for package: 2:libsmbclient-4.0.0-168.fc18.rc5.i686
—> Package samba-common.i686 2:4.0.3-2.fc18 will be an update
–> Running transaction check
—> Package libsmbclient.i686 2:4.0.0-168.fc18.rc5 will be updated
—> Package libsmbclient.i686 2:4.0.3-2.fc18 will be an update
—> Package samba-libs.i686 2:4.0.0-168.fc18.rc5 will be updated
—> Package samba-libs.i686 2:4.0.3-2.fc18 will be an update
–> Processing Dependency: libwbclient = 2:4.0.3-2.fc18 for package: 2:samba-libs-4.0.3-2.fc18.i686
–> Running transaction check
—> Package libwbclient.i686 2:4.0.0-168.fc18.rc5 will be updated
—> Package libwbclient.i686 2:4.0.3-2.fc18 will be an update
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
samba i686 2:4.0.3-2.fc18 updates 521 k
Updating:
samba-client i686 2:4.0.3-2.fc18 updates 461 k
samba-common i686 2:4.0.3-2.fc18 updates 700 k
Updating for dependencies:
libsmbclient i686 2:4.0.3-2.fc18 updates 109 k
libwbclient i686 2:4.0.3-2.fc18 updates 78 k
samba-libs i686 2:4.0.3-2.fc18 updates 4.2 M

Transaction Summary
================================================================================
Install 1 Package
Upgrade 2 Packages (+3 Dependent packages)

Total download size: 6.0 M
Downloading Packages:
Setting up and reading Presto delta metadata
updates/prestodelta | 1.6 MB 01:06
Processing delta metadata
Download delta size: 1.5 M
(1/4): libwbclient-4.0.0-168.fc18.rc5_4.0.3-2.fc18.i686.dr | 58 kB 00:11
(2/4): libsmbclient-4.0.0-168.fc18.rc5_4.0.3-2.fc18.i686.d | 63 kB 00:17
(3/4): samba-libs-4.0.0-168.fc18.rc5_4.0.3-2.fc18.i686.drp | 820 kB 00:21
(4/4): samba-common-4.0.0-168.fc18.rc5_4.0.3-2.fc18.i686.d | 546 kB 00:25
Finishing rebuild of rpms, from deltarpms
<locally rebuilding deltarpms> | 5.0 MB 00:19
Presto reduced the update size by 72% (from 5.0 M to 1.5 M).
Package(s) data still to download: 461 k
warning: /var/cache/yum/i386/18/updates/packages/samba-client-4.0.3-2.fc18.i686.rpm: Header V3 RSA/SHA256 Signature, key ID de7f38bd: NOKEY
Public key for samba-client-4.0.3-2.fc18.i686.rpm is not installed
(1/2): samba-client-4.0.3-2.fc18.i686.rpm | 461 kB 00:08
(2/2): samba-4.0.3-2.fc18.i686.rpm | 521 kB 00:16
——————————————————————————–
Total 61 kB/s | 982 kB 00:16
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-i386
Importing GPG key 0xDE7F38BD:
Userid : “Fedora (18) <fedora@fedoraproject.org>”
Fingerprint: 7efb 8811 dd11 e380 b679 fced ff01 125c de7f 38bd
Package : fedora-release-18-1.noarch (@anaconda)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-i386
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : 2:libwbclient-4.0.3-2.fc18.i686 1/11
Updating : 2:samba-libs-4.0.3-2.fc18.i686 2/11
Updating : 2:samba-common-4.0.3-2.fc18.i686 3/11
Updating : 2:libsmbclient-4.0.3-2.fc18.i686 4/11
Updating : 2:samba-client-4.0.3-2.fc18.i686 5/11
Installing : 2:samba-4.0.3-2.fc18.i686 6/11
Cleanup : 2:samba-client-4.0.0-168.fc18.rc5.i686 7/11
Cleanup : 2:libsmbclient-4.0.0-168.fc18.rc5.i686 8/11
Cleanup : 2:samba-common-4.0.0-168.fc18.rc5.i686 9/11
Cleanup : 2:samba-libs-4.0.0-168.fc18.rc5.i686 10/11
Cleanup : 2:libwbclient-4.0.0-168.fc18.rc5.i686 11/11
Verifying : 2:libwbclient-4.0.3-2.fc18.i686 1/11
Verifying : 2:samba-4.0.3-2.fc18.i686 2/11
Verifying : 2:samba-libs-4.0.3-2.fc18.i686 3/11
Verifying : 2:samba-common-4.0.3-2.fc18.i686 4/11
Verifying : 2:libsmbclient-4.0.3-2.fc18.i686 5/11
Verifying : 2:samba-client-4.0.3-2.fc18.i686 6/11
Verifying : 2:libsmbclient-4.0.0-168.fc18.rc5.i686 7/11
Verifying : 2:samba-common-4.0.0-168.fc18.rc5.i686 8/11
Verifying : 2:libwbclient-4.0.0-168.fc18.rc5.i686 9/11
Verifying : 2:samba-libs-4.0.0-168.fc18.rc5.i686 10/11
Verifying : 2:samba-client-4.0.0-168.fc18.rc5.i686 11/11

Installed:
samba.i686 2:4.0.3-2.fc18

Updated:
samba-client.i686 2:4.0.3-2.fc18 samba-common.i686 2:4.0.3-2.fc18

Dependency Updated:
libsmbclient.i686 2:4.0.3-2.fc18 libwbclient.i686 2:4.0.3-2.fc18
samba-libs.i686 2:4.0.3-2.fc18

Complete!

2. Config samba service start automatically at boot time:

[root@dhcppc2 ~]# systemctl enable smb.service
ln -s ‘/usr/lib/systemd/system/smb.service’ ‘/etc/systemd/system/multi-user.target.wants/smb.service’
[root@dhcppc2 ~]# systemctl enable nmb.service
ln -s ‘/usr/lib/systemd/system/nmb.service’ ‘/etc/systemd/system/multi-user.target.wants/nmb.service’
[root@dhcppc2 ~]# systemctl start smb.service
[root@dhcppc2 ~]# systemctl start nmb.service

3. Disable the SELinux:

[root@dhcppc2 ~]# vi /etc/selinux/config

# 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 – No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted – Targeted processes are protected,
# minimum – Modification of targeted policy. Only selected processes are protected.
# mls – Multi Level Security protection.
SELINUXTYPE=targeted

Reboot your Fedora Server.

4. Let firewall permit samba service:

[root@dhcppc2 ~]# firewall-cmd –add-service=samba

5. Now edit samba config file:

[root@dhcppc2 ~]# vi /etc/samba/smb.conf

Edit these line or change it according to your requirement:

#======================= Global Settings =====================================
 [global]
 workgroup = WORKGROUP
 security = share
 map to guest = bad user
 #============================ Share Definitions ==============================
 [MyShare]
 path = /samba/share
 browsable =yes
 writable = yes
 guest ok = yes
 read only = no

6. Restart the service:

[root@dhcppc2 ~]# systemctl restart smb.service
[root@dhcppc2 ~]# systemctl restart nmb.service

7. Access samba server from windows client:

fedora18 samb server 2

8. Now you can access any resource from samba server:

fedora18 samb server 3

 

Part 2: http://ithelpblog.com/os/linux/redhat/fedora/howto-configure-user-authentication-on-samba-server-fedora-18/

Thanks for using ithelpblog.com

 

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>