Scroll Top

How to Configure SAMBA on a Linux Server

Step By step guide to configuring SAMBA on a LINUX server.

This is for network administrators with experience configuring and administrating LINUX servers that want to know how to configure a SAMBA file server the right way step by step.

In this step by step tutorial I am going to show you how to make a shared folder on a linux server and share it so users on Microsoft windows workstations can access it on a local – internal network.

In this tutorial I am going to make the folder called “shared folder” and allow everybody access to the folder and printer networked to the Linux server.

This is a basic how to guide for configuring 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 using a unix text editor. I like NANO since it is very easy to use. Below are the commands I used to perform 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 configuration file. Now copy and paste the below text…after that is done hit the control and X buttons on your keyboard to exit out of the NANO text editor. Then hit the Y button and last hit the ENTER button. Now we are 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. 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 browseable = yes writable = yes public = yes read only = no

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

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

[root@localhost ~]# useradd chris [root@localhost ~]# passwd chris Changing password for user chris. New UNIX password: Retype new UNIX password: passwd: all authentication tokens 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 check 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 up

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

Now let’s verify the service is running

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

STEP 4 reboot your windows XP workstations then go to network “my network places” then go to “workgroup computers”. You will see a computer there called “My Linux File Server”. You can manually map a local drive letter to this folder or write a logon script the same as you would connecting to a Microsoft file server – shared folder. Double click on that computer and you will be prompted for a user name and password. Use the user name and password you choose in step #2 Now you will see a folder called “shared folder” You can copy and paste data to this folder just like it were a windows file server.



AUTOPOST by BEDEWY VISIT GAHZLY

Related Posts

Privacy Preferences
When you visit our website, it may store information through your browser from specific services, usually in form of cookies. Here you can change your privacy preferences. Please note that blocking some types of cookies may impact your experience on our website and the services we offer.