Below shows you the basic steps in order to configure your Linux Redhat / CentOS server as a Samba server.
Install and Configure
yum install samba -y
chkconfig --level 123 smb on
cd /etc/samba
mv smb.conf smb.conf.backup
vi smb.conf
cat > /etc/samba/smb.conf
[paste the text below]
[global]
workgroup = Workgroup
netbios name = SambaServerserver string = Samba Server %v
log file = /var/log/samba/log.%m
encrypt passwords = yes
max log size = 50
[data]
path = /data
valid users = smbuser
read only = No
Configure Users
adduser smbuser
passwd smbuser
smbpasswd -a smbuser [enter the same password as your smbuser unix account]
Restart Samba
/etc/init.d/smb restart
Map Drive
You can now map your drive with the windows command prompt using the command :
C:\Users\admin>net use * \\[SAMBA SERVER IP]\data /user:smbuser [password] /PERSISTENT:YES
Troubleshooting
To see if the share is available you can run the following command :
[[email protected] ~]# smbclient -U smbuser -L //[SAMBA SERVER IP]
Password:
Domain=[FILESERVER] OS=[Unix] Server=[Samba 3.0.33-3.29.el5_5]
Sharename Type Comment
--------- ---- -------
data Disk
IPC$ IPC IPC Service (Samba Server 3.0.33-3.29.el5_5)
Domain=[FILESERVER] OS=[Unix] Server=[Samba 3.0.33-3.29.el5_5]
Latest posts by Rick Donato (see all)
- How to Configure a BIND Server on Ubuntu - March 15, 2018
- What is a BGP Confederation? - March 6, 2018
- Cisco – What is BGP ORF (Outbound Route Filtering)? - March 5, 2018
Want to become a Linux expert?
Here is our hand-picked selection of the best courses you can find online:
Linux Mastery course
Linux Administration Bootcamp
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial