Configure Linux samba server step by step guide example and
implementation
Exam question There are mixed lots of System
running on Linux and Windows OS. Some users are working on Windows Operating
System. There is a /data directory on Linux server should
make available on windows to only sadeek should have right to connect with
samba server . Configure to make available.
Configure samba server
How to make a Samba Server on RHEL6
Install Samba packages in your machine by yum command:
[root@sadeek~]$ yum install samba* -y
Open Samba's configuration file:
[root@sadeek ~]$ vi /etc/samba/smb.conf
# at line 58 add the following
unix charset = UTF-8
dos charset = CP932
# at line 75 change to the windows workgroup.
workgroup = WORKGROUP
# at line 81 uncomment and change the ip addresses.
hosts allow = 127. 192.168.
(127 is for local host and your machine virtual ip if you
are using a VM).
# at line 102 change the parameters.
security = user
[root@sadeek ~]$ vi /etc/sysconfig/iptables
Add the line at the last before commit.
-A INPUT -i vmnet6 -j ACCEPT (If using VMPlayer).
-A INPUT -i virbr0 -j ACCEPT (If using
Virt-Manager).
(The values of vmnet6 and virbr0 may change as per your
machine's config.).
Restart service iptables:
[root@sadeek ~]$ service iptables restart
Enable sharing of home directories:
[root@sadeek~]$ setsebool -P samba_enable_home_dirs=on
Now set a password for the user who is going to access that in windows machine:
[root@sadeek~]$ smbpasswd -a sadeek
New SMB password:
Retype new SMB password:
Now restart samba services:
[root@sadeek ~]$ service smb restart
[root@sadeek~]$ service nmb restart
Now make these services to be enabled at boot time so that you need not to start those again and again.
[root@sadeek~]$ chkconfig on smb
[root@sadeek~]$ chkconfig on nmb
Task to be performed on Windows Box:
Double-click the "My Computer" icon on the
desktop.
In the address bar, type "\\192.168.122.123" [Your
server ip]without the quotes and hit Enter
Username: sadeek (Username to be used when you did smbpasswd
-a USERNAME).
Password: Which you used while setting smbpasswd.
Check "Remember my password" so you need not to
enter password again and again.
Click on ok.
Right-click the folder named sadeek [USERNAME].
Choose "Map Network Drive".
Ensure that "Reconnect at Logon" is checked
No comments:
Post a Comment