NOTE: This set up is very “open” and should not be used on servers which are facing the world. This is for private network where you trust all the computers and its users.
Installing Samba (using yum on CentOS ): yum install samba
Installing Samba (using rpm):
- Obtain Samba rpm from rhn.redhat.com
- rpm -ivh samba*.rpm
Configuring Samba:
cd /etc/samba
mv smb.conf smb.conf.backup
vi smb.conf
Paste content below in to your vi:
[global]
workgroup = wrkgrp
netbios name = smbserver
security = SHARE
load printers = No
default service = global
path = /home
available = No
encrypt passwords = yes
[share]
writeable = yes
admin users = smbuser
path = /home/share
force user = root
valid users = smbuser
public = yes
available = yes
save and exit
adduser smbuser #add unix account
passwd smbuser #set unix account password
smbpasswd -a smbuser #lets create same user account on samba
<put same password as your unix account password>
/etc/init.d/smb restart
Now let us setup drive letter on our Windows so we can easily access these files.
Start -> run -> cmd <enter>
At the prompt type: net use z: \\ip_of_your_samba_server\share /user: smbuser password_you_assigned
That is it! At this point you have successfully set up Samba under Linux and are now successfully connected to your share from your Windows machine.


