{"id":25587,"date":"2024-02-29T14:17:36","date_gmt":"2024-02-29T14:17:36","guid":{"rendered":"https:\/\/linuxways.net\/?p=25587"},"modified":"2024-02-29T14:20:34","modified_gmt":"2024-02-29T14:20:34","slug":"install-configure-samba-arch-linux","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/arch\/install-configure-samba-arch-linux\/","title":{"rendered":"How to Install and Configure SAMBA on Arch Linux"},"content":{"rendered":"<p>Communicating with other operating systems connected to the same network for file sharing, printing, or sending any instruction from the server to the client has been made easy by a number of server applications. On Arch and other Linux distributions, Samba is particularly relevant as it bridges the gap between Windows operating systems and Linux-based systems.<\/p>\n<p>Samba is a client-server application that enables file and printer sharing between the different operating systems connected to the same network. Moreover, it allows to access files and resources on a Linux server to Windows or between two different Linux distributions and vice versa.<\/p>\n<p><strong>Outline:<\/strong><\/p>\n<ul>\n<li><a href=\"#post-25587-_otfwe8u7jiqu\"><strong>How to Install Samba on Arch Linux<\/strong><\/a><\/li>\n<li><a href=\"#post-25587-_rk7qupwanjcf\"><strong>How To Configure Samba on Arch Linux<\/strong><\/a><\/li>\n<li><a href=\"#post-25587-_w5m9y912x6ro\"><strong>How to Remove Samba Server From Arch Linux<\/strong><\/a><\/li>\n<li><a href=\"#post-25587-_6ib8frvou686\"><strong>Conclusion<\/strong><\/a><\/li>\n<\/ul>\n<h2><a id=\"post-25587-_otfwe8u7jiqu\"><\/a><strong>How To Install Samba on Arch Linux <\/strong><\/h2>\n<p>On Arch Linux Samba can be installed using its default package installer, however before executing the installation command update it and afterward execute:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> pacman <span class=\"re5\">-S<\/span> samba<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"633\" height=\"372\" class=\"wp-image-25598\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-1.png 633w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-1-300x176.png 300w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/p>\n<p>Once the installation is successfully completed, verify it by checking the details about the package installed:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> pacman <span class=\"re5\">-Qi<\/span> samba<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"633\" height=\"317\" class=\"wp-image-25602\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-2.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-2.png 633w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-2-300x150.png 300w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/p>\n<p>Next, you can also check the directories created for Samba by using the <em>whereis<\/em> command which will help you in locating the file related to it:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">whereis<\/span> samba<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"635\" height=\"190\" class=\"wp-image-25606\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-3.png 635w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-3-300x90.png 300w\" sizes=\"auto, (max-width: 635px) 100vw, 635px\" \/><\/p>\n<h2><a id=\"post-25587-_rk7qupwanjcf\"><\/a><strong>How To Configure Samba on Arch Linux <\/strong><\/h2>\n<p>Samba by default doesn\u2019t come with its configuration file as users can create their own configuration files, you can see there is no file in the Samba directory:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw3\">cd<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>samba<br \/>\n<br \/>\n<span class=\"kw2\">ls<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"633\" height=\"172\" class=\"wp-image-25610\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-4.png 633w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-4-300x82.png 300w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/p>\n<p>However, to run the Samba service you need to create its configuration file, for demonstration Arch Linux help page gives a dummy configuration file that can be used for learning purposes. So visit the <a href=\"https:\/\/git.samba.org\/samba.git\/?p=samba.git;a=blob_plain;f=examples\/smb.conf.default;hb=HEAD\">Samba Git repository<\/a> and copy the code from there, next create a Samba configuration file in the Samba directory and paste the code there:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">nano<\/span> smb.conf<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"635\" height=\"386\" class=\"wp-image-25615\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-5.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-5.png 635w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-5-300x182.png 300w\" sizes=\"auto, (max-width: 635px) 100vw, 635px\" \/><\/p>\n<p>Next, in the configuration file, set the workgroup name as per your preference, though the already written one is also correct, but such names are used for Windows operating systems. Here, I have set my workgroup name to ARCHGROUP:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co0\"># workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH<\/span><br \/>\n<br \/>\nworkgroup = <span class=\"sy0\">&lt;<\/span>Group-name<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"635\" height=\"299\" class=\"wp-image-25621\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-6.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-6.png 635w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-6-300x141.png 300w\" sizes=\"auto, (max-width: 635px) 100vw, 635px\" \/><\/p>\n<p>Now at the bottom of the code in the configuration file add the below-given lines of code:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"br0\">&#91;<\/span>sambashare<span class=\"br0\">&#93;<\/span><br \/>\n<br \/>\ncomment = My Samba Share<br \/>\n<br \/>\npath = <span class=\"sy0\">\/<\/span>samba<br \/>\n<br \/>\nwritable = <span class=\"kw2\">yes<\/span><br \/>\n<br \/>\nbrowsable = <span class=\"kw2\">yes<\/span><br \/>\n<br \/>\ncreate mask = 0700<br \/>\n<br \/>\ndirectory mask = 0700<br \/>\n<br \/>\n<span class=\"kw2\">read<\/span> only = no<br \/>\n<br \/>\nguest ok = no<\/div><\/div>\n<p>Here is the one-line explanation for each instruction that I have added:<\/p>\n<p><strong>[sambashare]<\/strong>: This is the section header that defines the share<\/p>\n<p><strong>Comment:<\/strong> it is a brief description of the samba share.<\/p>\n<p><strong>Path:<\/strong> it specifies the directory of the server system which will be shared with other systems.<\/p>\n<p><strong>Writable:<\/strong> This option allows or restricts the users from editing the files within the shared folder.<\/p>\n<p><strong>Browsable:<\/strong> This option allows users to discover and access the files or data on the shared directory.<\/p>\n<p><strong>Create Mask:<\/strong> To determine the permissions (write, read, and execute) assigned to newly created files in the Samba share this option is used. In this case, I have set the permissions for only the owner.<\/p>\n<p><strong>Directory Mask:<\/strong> To determine the permissions (write, read, and execute) assigned to newly created directories in the Samba share this option is used. In this case, I have set the permissions for only the owner.<\/p>\n<p><strong>Read only:<\/strong> To give read and write access to users about the shared folder. Here no means they have read and writ access.<\/p>\n<p><strong>Guest ok: <\/strong>To restrict or allow the guest or anonymous access to the shared folder of Samba share this option is used.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"635\" height=\"370\" class=\"wp-image-25630\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-7.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-7.png 635w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-7-300x175.png 300w\" sizes=\"auto, (max-width: 635px) 100vw, 635px\" \/><\/p>\n<p>Here at the bottom a template is given which can be used to set various parameters for the Samba configuration, you can use this template by placing values or data of your choice:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"632\" height=\"303\" class=\"wp-image-25637\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-8.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-8.png 632w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-8-300x144.png 300w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\" \/><\/p>\n<p>Now move to the home directory and create a new group:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> groupadd <span class=\"re5\">-r<\/span> smbusers<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"634\" height=\"143\" class=\"wp-image-25646\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-9.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-9.png 634w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-9-300x68.png 300w\" sizes=\"auto, (max-width: 634px) 100vw, 634px\" \/><\/p>\n<p>Now add the user to whom you want to give access for Samba share:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> usermod <span class=\"re5\">-aG<\/span> smbusers <span class=\"sy0\">&lt;<\/span>user-name<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"632\" height=\"123\" class=\"wp-image-25654\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-10.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-10.png 632w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-10-300x58.png 300w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\" \/><\/p>\n<p>I did this because I want to use my username for the Samba share if you want you can also create an extra user for the Samba service as well. Now I need to give a password for this samba service, so for that:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> smbpasswd <span class=\"re5\">-a<\/span> <span class=\"sy0\">&lt;<\/span>user-name<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"638\" height=\"156\" class=\"wp-image-25664\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-11.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-11.png 638w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-11-300x73.png 300w\" sizes=\"auto, (max-width: 638px) 100vw, 638px\" \/><\/p>\n<p>Now you have to create a directory that you want to have for Samba share on Arch as previously in the configuration file we set the directory path \/samba to create it:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">mkdir<\/span> <span class=\"sy0\">\/<\/span>samba<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"637\" height=\"126\" class=\"wp-image-25671\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-12.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-12.png 637w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-12-300x59.png 300w\" sizes=\"auto, (max-width: 637px) 100vw, 637px\" \/><\/p>\n<p>Now change the ownership of the Samba directory to the smbusers group and for that execute:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">chown<\/span> <span class=\"re5\">-R<\/span> :smbusers <span class=\"sy0\">\/<\/span>samba<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"634\" height=\"169\" class=\"wp-image-25676\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-13.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-13.png 634w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-13-300x80.png 300w\" sizes=\"auto, (max-width: 634px) 100vw, 634px\" \/><\/p>\n<p>Now for Samba configuration, change the permissions of this Samba directory on Arch and for that execute:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">chmod<\/span> <span class=\"nu0\">1770<\/span> <span class=\"sy0\">\/<\/span>samba<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"637\" height=\"138\" class=\"wp-image-25683\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-14.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-14.png 637w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-14-300x65.png 300w\" sizes=\"auto, (max-width: 637px) 100vw, 637px\" \/><\/p>\n<p>Now to activate the Samba we need to start the Samba service:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> systemctl <span class=\"kw3\">enable<\/span> <span class=\"re5\">--now<\/span> smb<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"638\" height=\"157\" class=\"wp-image-25690\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-15.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-15.png 638w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-15-300x74.png 300w\" sizes=\"auto, (max-width: 638px) 100vw, 638px\" \/><\/p>\n<p>The nmb is one of the daemons that create the Samba suite which is responsible for understanding and responding to the NetBIOS name service requests that are generated by either SMB or CIFS clients. So to make Samba function properly this service also needs to be activated:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> systemctl <span class=\"kw3\">enable<\/span> <span class=\"re5\">--now<\/span> nmb<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"636\" height=\"140\" class=\"wp-image-25696\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-16.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-16.png 636w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-16-300x66.png 300w\" sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/p>\n<p>Now the Samba service is up and running and next, we need to connect the client with this share before jumping to the client we need to check if all the settings are correct and the service is working correctly so for that execute:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">testparm<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"632\" height=\"379\" class=\"wp-image-25703\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-17.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-17.png 632w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-17-300x180.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-17-501x300.png 501w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\" \/><\/p>\n<p>Now the last thing that you need to do on the server machine is to look for its IP address as it will be needed to mount the shared folder on the client machine.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">ip<\/span> a<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"639\" height=\"401\" class=\"wp-image-25707\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-18.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-18.png 639w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-18-300x188.png 300w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/p>\n<p>Now launch the client machine and go to the file manager in case it is Linux and then click on Other locations, execute the following command in the execution bar below, and click on connect:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">smb:<span class=\"sy0\">\/\/&lt;<\/span>your-server-ip-address<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"748\" height=\"513\" class=\"wp-image-25715\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-19.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-19.png 748w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-19-300x206.png 300w\" sizes=\"auto, (max-width: 748px) 100vw, 748px\" \/><\/p>\n<p>Once the connection is successful the sambashare server will appear right click on it and then select the mount option:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"753\" height=\"494\" class=\"wp-image-25721\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-20.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-20.png 753w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-20-300x197.png 300w\" sizes=\"auto, (max-width: 753px) 100vw, 753px\" \/><\/p>\n<p>Next, a pop will appear that will require a password, username, and domain to establish the connection of the client device with the server system. The username and domain name are most likely to be picked up automatically, in case if not then enter the server workgroup name as the domain name and username in the server system. Once done, click on <strong>Connect<\/strong> to proceed with establishing the connection:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"749\" height=\"515\" class=\"wp-image-25726\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-21.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-21.png 749w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-21-300x206.png 300w\" sizes=\"auto, (max-width: 749px) 100vw, 749px\" \/><\/p>\n<p>After the connection is established, you will see the mounted samba share in the menu on the left. Now here to verify the connection, I have created a Samba test folder for the right-click menu:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"751\" height=\"479\" class=\"wp-image-25734\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-22.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-22.png 751w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-22-300x191.png 300w\" sizes=\"auto, (max-width: 751px) 100vw, 751px\" \/><\/p>\n<p>Now I have verified the connection by navigating to Samba directory on the server side and upon listing the contents of the directory you can see the same test folder:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1123\" height=\"418\" class=\"wp-image-25740\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-23.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-23.png 1123w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-23-300x112.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-23-1024x381.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-23-768x286.png 768w\" sizes=\"auto, (max-width: 1123px) 100vw, 1123px\" \/><\/p>\n<p>Now to avoid establishing the connection manually every time by entering the IP address, unmount the Samba share directory and delete the folder:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"854\" height=\"580\" class=\"wp-image-25746\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-24.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-24.png 854w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-24-300x204.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-24-768x522.png 768w\" sizes=\"auto, (max-width: 854px) 100vw, 854px\" \/><\/p>\n<p>Now mount the Samba directory here in the client machine and then make it persistent so that when the machine is booted the Samba share is always available. This will remove the hassle of logging in to Samba every time manually by giving the IP address of the server side. So for that first of all we have to create a Samba share server directory on Arch where we can mount it, here I have created a directory named server:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">mkdir<\/span> server<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"636\" height=\"322\" class=\"wp-image-25751\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-25.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-25.png 636w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-25-300x152.png 300w\" sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/p>\n<p>Now mount the samba share in the server directory we created previously by using the server IP address and a bunch of other options:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">mount<\/span> <span class=\"re5\">-t<\/span> cifs <span class=\"sy0\">\/\/&lt;<\/span>server-ip-address<span class=\"sy0\">&gt;\/<\/span>sambashare <span class=\"sy0\">\/<\/span>home<span class=\"sy0\">\/<\/span>linuxways<span class=\"sy0\">\/<\/span>server <span class=\"re5\">-o<\/span> <span class=\"re2\">username<\/span>=linuxways,<span class=\"re2\">password<\/span>=ab1122,<span class=\"re2\">workgroup<\/span>=ARCHGROUP<\/div><\/div>\n<p>Here, I have used the common internet file system (CIFS) that is normally used for mounting Windows shared folders and to specify it, the t flag is used. Next to add multiple options o flag is used, and the options include the username, password, and workgroup name.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"636\" height=\"176\" class=\"wp-image-25755\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-26.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-26.png 636w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-26-300x83.png 300w\" sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/p>\n<p>Once the mounting is successful do the same exercise of creating a folder by navigating to the server directory:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw3\">cd<\/span> server<span class=\"sy0\">\/<\/span><br \/>\n<br \/>\n<span class=\"kw2\">sudo<\/span> <span class=\"kw2\">touch<\/span> smbtest.txt<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"632\" height=\"200\" class=\"wp-image-25759\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-27.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-27.png 632w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-27-300x95.png 300w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\" \/><\/p>\n<p>Now verify the file creation on the server side as well by navigating to the Samba directory:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1143\" height=\"396\" class=\"wp-image-25765\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-28.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-28.png 1143w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-28-300x104.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-28-1024x355.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-28-768x266.png 768w\" sizes=\"auto, (max-width: 1143px) 100vw, 1143px\" \/><\/p>\n<h2><a id=\"post-25587-_w5m9y912x6ro\"><\/a><strong>How To Remove Samba Server From Arch Linux<\/strong><\/h2>\n<p>The complete removal of Samba is quite a lengthy process but it is easy to follow. Before beginning to remove Samba it is recommended to back up your necessary files or folders as all the data will be removed after uninstallation. So the first step is to unmount the Samba share from the server directory on the client system:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">umount<\/span> server<span class=\"sy0\">\/<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"636\" height=\"152\" class=\"wp-image-25767\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-29.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-29.png 636w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-29-300x72.png 300w\" sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/p>\n<p>Now remove the server directory from the client system:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">rm<\/span> <span class=\"re5\">-r<\/span> server<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"634\" height=\"190\" class=\"wp-image-25771\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-30.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-30.png 634w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-30-300x90.png 300w\" sizes=\"auto, (max-width: 634px) 100vw, 634px\" \/><\/p>\n<p>Next move to the server system and remove Samba using the Arch Linux default package installer:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> pacman <span class=\"re5\">-Rcns<\/span> samba<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"703\" height=\"407\" class=\"wp-image-25775\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-31.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-31.png 703w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-31-300x174.png 300w\" sizes=\"auto, (max-width: 703px) 100vw, 703px\" \/><\/p>\n<p>Now remove the samba directory created on the Arch server machine:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">rm<\/span> <span class=\"re5\">-r<\/span> <span class=\"sy0\">\/<\/span>samba<span class=\"sy0\">\/<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"707\" height=\"162\" class=\"wp-image-25779\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-32.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-32.png 707w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-32-300x69.png 300w\" sizes=\"auto, (max-width: 707px) 100vw, 707px\" \/><\/p>\n<p>Next, delete the user group created for Samba share on Arch:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> groupdel smbusers<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"705\" height=\"143\" class=\"wp-image-25782\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-33.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-33.png 705w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-33-300x61.png 300w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><\/p>\n<p>Lastly, delete the configuration file along with the Samba directory created on the server machine while configuring Samba on Arch Linux:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">rm<\/span> <span class=\"re5\">-r<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>samba<span class=\"sy0\">\/<\/span>smb.conf<br \/>\n<br \/>\n<span class=\"kw2\">sudo<\/span> <span class=\"kw2\">rm<\/span> <span class=\"re5\">-r<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>samba<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"634\" height=\"131\" class=\"wp-image-25786\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-34.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-34.png 634w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25587-34-300x62.png 300w\" sizes=\"auto, (max-width: 634px) 100vw, 634px\" \/><\/p>\n<h2><a id=\"post-25587-_6ib8frvou686\"><\/a><strong>Conclusion<\/strong><\/h2>\n<p>Samba is a software suite that enables print and file sharing between Linux and Windows operating systems, to install it on Arch use its default package installer. To configure Samba on Arch Linux you need to first create its configuration file and then create a Samba user group, afterward activate the service, and mount the created directory for Samba. To connect the shared directory, simply use the server IP address.<\/p>","protected":false},"excerpt":{"rendered":"<p>To install Samba on Arch use Pacman to configure it first create its configuration file and then create a Samba user group, and afterward mount it.<\/p>","protected":false},"author":113,"featured_media":25823,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1055],"tags":[],"class_list":["post-25587","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arch"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/25587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=25587"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/25587\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/25823"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=25587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=25587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=25587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}