# 1 Configuring a shared directory which can be accessed by anyone. Server Settings [root@ora ~]# yum –y install samba* [root@ora ~]# mkdir /home/share [root@ora ~]# chmod 777 /home/share [root@ora ~]# 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.0.0.1 192.168.0.0/24 # at line 102 change the parameters. security = share # add the following entries at the end. [share] path = /home/share writable = yes guest ok = yes guest only = yes create mode = 0777 directory mode = 0777 share modes = yes # restart the services [root@ora ~]# service smb restart [root@ora ~]# service nmb restart [root@ora ~]# chkconfig smb on [root@ora ~]# chkconfig nmb on Client Settings. Right click on my computer > Properties > Computer Name click on change computer name: client01 workgroup: WORKGROUP
Press Ok Restart the computer After restart open My Computer > Tools > Map Network Drive Choose these name or ip address of the server and the directory Which is shared.
# 2 Samba share but with authentication. [root@ora ~] # groupadd company [root@ora ~] # mkdir /home/company [root@ora ~] # chgrp company /home/company [root@ora ~] # chmod 770 /home/company [root@ora ~] # vi /etc/samba/smb.conf # line 102 change the parameter Security = user # add the following at the last line. [company] path = /home/company writable = yes create mode = 0770 directory mode = 0770 share modes = yes guest ok = no valid users = @company [root@ora ~] # service smb restart [root@ora ~] # service nmb restart [root@ora ~] # useradd –G company rhel6 [root@ora ~] # smbpasswd –a rhel6 New SMB password: Retype new SMB password: Added user cent
how to configure SAMBA for a domain based computer
ReplyDeletetry the following link.
Deletehttp://www.scribd.com/doc/70115904/RHEL6-Samba-Server-in-AD-Domain-Deployment-Guide
thnks this is sufficient knowledge for me
ReplyDeleteIt was very helpful for me.....Thanks
ReplyDeleteThank you very much !:)
ReplyDeleteThis was very much useful
ReplyDeleteThank you
Panduka
I tried this code, but on windows machine i am not able to open the linux shares. It asks me for username and password that i supply. The linux data become visible to me but when i double click it, that time it gives me the message that windows cannot access the //192.168.1.9 etc data
ReplyDeletethanks...
ReplyDeletethankzz
ReplyDelete