Step-by-step guide to configure SAMBA on a LINUX server.

This is for network administrators with experience in configuring and managing LINUX servers who want to know how to configure a SAMBA file server in the correct step-by-step manner.

In this step-by-step tutorial, I will show you how to create a shared folder on a Linux server and share it so that Microsoft Windows workstation users can access it on a local internal network.

In this tutorial, I will create the folder called “shared folder” and allow everyone to access the networked folder and printer to the Linux server.

This is a basic guide on how to configure a samba workgroup file server. I will cover how to build and configure a samba PDC – Primary Domain Controller in another tutorial for more experienced network administrators.

STEP 1 Open the samba configuration file with a Unix text editor. I like NANO because it is very easy to use. Below are the commands I used to accomplish this task.

[root@localhost ~]# cd / etc [root@localhost etc]# cd samba [root@localhost samba]# nano smb.conf

Ok, now we are in the smb.conf file. Now delete all the text in the config file. Now copy and paste the text below … once done press the control and X buttons on your keyboard to exit the NANO text editor. Then press the Y button and finally press the ENTER button. Now we go back to the command prompt and our samba configuration file is edited and saved.

[global] workgroup = workgroup server string = My Linux file server hosts allow = 192.168.0.1. 127. log file = /var/log/samba/%m.log security = user netbios name = SAMBA SERVER encrypt passwords = yes smb passwd file = / etc / samba / smbpasswd socket options = TCP_NODELAY SO_RCVBUF = 8192 SO_SNDBUF = 8192

[shared folder] comment = My home directory browsable = yes modifiable = yes public = yes read-only = no

[printers] path = / var / spool / samba public = yes guest OK = yes printable = yes browsable = yes writable = yes read-only = no

STEP 2 We have to create a user account on the Linux server itself, then we will create a samba user on top of the Linux user account.

[root@localhost ~]#useradd chris [root@localhost ~]# passwd chris Password change for user chris. New UNIX password: retype new UNIX password: passwd: all authentication tokens were updated successfully. [root@localhost ~]# smbpasswd -a chris New SMB password: Retype new SMB password: getsmbfilepwent: malformed password entry (no 🙂 mod_smbfilepwd_entry: malformed password entry (no 🙂 [root@localhost ~]#

STEP 3 We have to start the SAMBA service. It may already be started or it may not … so let’s go and see.

[root@localhost ~]# service smb status smbd is stopped nmbd is stopped [root@localhost ~]#

The samba service is not running, so let’s start it.

[root@localhost ~]# service smb start smbd (pid 4267 4266) is running … nmbd (pid 4271) is running … [root@localhost ~]#

Now let’s verify that the service is running.

[root@localhost ~]# service smb status smbd (pid 4267 4266) is running … nmbd (pid 4271) is running … [root@localhost ~]#

STEP 4 restart your Windows XP workstations, then go to the “My Network Places” network and then go to “Workgroup Computers”. You will see a computer called “My Linux File Server”. You can manually assign a local drive letter to this folder or write a login script in the same way that you would when connecting to a Microsoft file server: shared folder. Double click on that computer and you will be prompted for a username and password. Use the username and password you chose in step 2. You will now see a folder called “shared folder”. You can copy and paste data into this folder as if it were a Windows file server.