• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install and configure Samba Server on Fedora 34

  • 00:48 cat /etc/os-release
  • 01:08 dnf install samba -y
  • 01:34 systemctl start smb
  • 01:47 systemctl enable smb
  • 02:00 systemctl status smb
  • 02:26 mkdir /data
  • 02:32 mkdir /value
  • 02:41 adduser --system shareuser
  • 03:00 adduser --system shareuser1
  • 03:23 chown -R shareuser /data
  • 03:42 chown -R shareuser1 /value
  • 04:02 chcon -Rt samba_share_t /data
  • 04:37 chcon -Rt samba_share_t /value
  • 05:08 vi /etc/samba/smb.conf
  • 09:04 smbpasswd -a shareuser
  • 09:36 smbpasswd -a shareuser1
  • 10:03 smbpasswd -e shareuser
  • 10:24 smbpasswd -e shareuser1
  • 10:42 systemctl restart smb nmb
  • 11:02 systemctl enable smd nmb
  • 11:27 ip a s
{{postValue.id}}

To Install And Configure Samba Server On Fedora 34

Introduction:

Samba is an incredibly powerful tool that allows you to create seamless file and printer sharing to smb/cifs clients from a linux server/desktop. with samba you can even connect that linux machine to a windows domain. this video will show you the method of how to install samba on fedora 34.

Installation process:

Step 1: Check the OS version by using the below command

[root@linuxhelp ~]# cat /etc/os-release
NAME=Fedora
VERSION="34 (Workstation Edition)"
ID=fedora
VERSION_ID=34
VERSION_CODENAME=""
PLATFORM_ID="platform:f34"
PRETTY_NAME="Fedora 34 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:34"

Step 2: Install samba server by using the below command

[root@linuxhelp ~]# dnf install samba -y
Fedora Modular 34 - x86_64 -
Fedora 34 - x86_64 - 00:00    
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                1/1
  Verifying        : samba-common-libs-2:4.14.2-1.fc34.x86_64                                                                                                     15/15

Upgraded:
  libsmbclient-2:4.14.8-0.fc34.x86_64    libwbclient-2:4.14.8-0.fc34.x86_64          samba-client-2:4.14.8-0.fc34.x86_64    samba-client-libs-2:4.14.8-0.fc34.x86_64   
  samba-common-2:4.14.8-0.fc34.noarch    samba-common-libs-2:4.14.8-0.fc34.x86_64   
Installed:
  samba-2:4.14.8-0.fc34.x86_64                     samba-common-tools-2:4.14.8-0.fc34.x86_64                     samba-libs-2:4.14.8-0.fc34.x86_64                    

Complete!

Step 3: Start SMB service by using the below command

[root@linuxhelp ~]# systemctl start smb

Step 4: Enable SMB service by using the below command

[root@linuxhelp ~]# systemctl enable smb
Created symlink /etc/systemd/system/multi-user.target.wants/smb.service → /usr/lib/systemd/system/smb.service.

Step 5: Check status of SMB service by using the below command

[root@linuxhelp ~]# systemctl status smb
● smb.service - Samba SMB Daemon
     Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
     Active: active (running) since Wed 2021-10-27 19:59:18 EDT; 28s ago
       Docs: man:smbd(8)
             man:samba(7)
             man:smb.conf(5)
   Main PID: 20864 (smbd)
     Status: "smbd: ready to serve connections..."
      Tasks: 4 (limit: 2261)
     Memory: 24.0M
        CPU: 125ms
     CGroup: /system.slice/smb.service
             ├─20864 /usr/sbin/smbd --foreground --no-process-group
             ├─20868 /usr/sbin/smbd --foreground --no-process-group
             ├─20869 /usr/sbin/smbd --foreground --no-process-group
             └─20870 /usr/sbin/smbd --foreground --no-process-group

Oct 27 19:59:18 linuxhelp systemd[1]: Starting Samba SMB Daemon...
Oct 27 19:59:18 linuxhelp systemd[1]: Started Samba SMB Daemon.
Oct 27 19:59:18 linuxhelp smbd[20864]: [2021/10/27 19:59:18.716963,  0] ../../lib/util/become_daemon.c:135(daemon_ready)
Oct 27 19:59:18 linuxhelp smbd[20864]:   daemon_ready: daemon 'smbd' finished starting up and ready to serve connections

Step 6: Create directory by using the below commands

[root@linuxhelp ~]# mkdir /data
[root@linuxhelp ~]# mkdir /value

Step 7: Add the user by using the below command

[root@linuxhelp ~]# adduser --system shareuser
[root@linuxhelp ~]# adduser --system shareuser1

Step 8: Change the owner in this directory by using the below command

[root@linuxhelp ~]# chown -R shareuser /data
[root@linuxhelp ~]# chown -R shareuser /value

Step 9: Disable the Selinux by using the Chcon command

[root@linuxhelp ~]# chcon -Rt samba_share_t /data
[root@linuxhelp ~]# chcon -Rt samba_share_t /value

Step 10: Open the samba configuration file and add the share details by using the below command

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

Step 11: Create smbpassword for this users by using the below command

[root@linuxhelp ~]# smbpasswd -a shareuser
New SMB password:
Retype new SMB password:
Added user shareuser.
 [root@linuxhelp ~]# smbpasswd -a shareuser1
New SMB password:
Retype new SMB password:
Added user shareuser1.

Step 12: Enable smbpassword for this users by using the below command

[root@linuxhelp ~]# smbpasswd -e shareuser
Enabled user shareuser.
[root@linuxhelp ~]# smbpasswd -e shareuser1
Enabled user shareuser1.

Step 13 : Restart the smb and nmb services by using the below command

[root@linuxhelp ~]# systemctl restart smb nmb

Step 14: Enable the smb and nmb services by using the below command

[root@linuxhelp ~]# systemctl enable smb nmb
Created symlink /etc/systemd/system/multi-user.target.wants/nmb.service → /usr/lib/systemd/system/nmb.service.

Step 15: Open and check the SElinux configuration file by using the below command.

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

Step 16: Check the firewall status by using the below command.

[root@linuxhelp ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
     Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2021-10-21 00:20:06 EDT; 6 days ago
       Docs: man:firewalld(1)
   Main PID: 988 (firewalld)
      Tasks: 4 (limit: 2261)
     Memory: 29.0M
        CPU: 1.478s
     CGroup: /system.slice/firewalld.service
             └─988 /usr/bin/python3 -s /usr/sbin/firewalld --nofork --nopid

Oct 21 00:20:02 fedora systemd[1]: Starting firewalld - dynamic firewall daemon...
Oct 21 00:20:06 fedora systemd[1]: Started firewalld - dynamic firewall daemon.
Oct 27 11:12:35 linuxhelp firewalld[988]: WARNING: ALREADY_ENABLED: 3128:tcp
Oct 27 11:16:05 linuxhelp firewalld[988]: WARNING: ALREADY_ENABLED: 3128:tcp

Step 17: Stop the firewall status by using the below command.

[root@linuxhelp ~]# systemctl stop firewalld

Step 18: Restart the smb and nmb services by using the below command.

[root@linuxhelp ~]# systemctl enable smb nmb

Step 19: Once completed go to run terminal type samba share id as shown in the below image. snap1

Step 20: There will be two folders share1 and share2 as shown in the below image snap2

Step 21: Then goto share1 and login as user1 and user2 and same for share2 as shown in the below image snap3

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to install and configure samba server on Fedora 34. Your feedback is much welcome

Tags:
liam
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

Is there any other command for adding users to a group without deleting the old users?

A

execute command "useradd -a -G group_name user_name".

Q

How to list samba users?

A

Use the command to list the samba users as "sudo pdbedit -L -v"

Q

What is the configuration file for samba?

A

it is /etc/samba/smb.conf.

Q

How to check whether samba is already installed in the system or not?

A

Use command rpm -q samba

Q

How to start and stop the samba server?

A

/etc/init.d/smb restart OR service smb restart

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Jayce ?
What are the types of table used in IPtables

What are the various types of table used in IPtables and how to use that for my server security?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.