Setting up Samba3.6.9 on Oracle Linux 6

This post is based on: http://www.techotopia.com/index.php/Sharing_Files_between_RHEL_6_and_Windows_Systems_with_Samba. However, there're important configuration changes according to my experiment.
This article walks you through setting up Samba on Oracle Linux 6, and sets up anonymous access to Linux directory.

0. su


1. Check if Samba is installed on Linux

rpm -q samba

2. Install Samba

yum install samba

3. Make sure you Linux firewall does not block Samba


4. Configure smb.conf 

vi /etc/samba/smb.conf
[global]
workgroup = 

[tmp] --Resource name you'll be seeing on Windows
path = /tmp --Linux path
writeable = yes
browseable = yes
valid users = demo --User created in Samba to access this directory

4.1 Configure anonymous access and no need to enter username password

--smb.conf
[tmp]
path = /u01/app/oracle/oradata/orcl
writeable = no
browseable = yes
public = yes
guest ok = yes

[global]
guest account = nobody
map to guest = bad user
--Create a user named nobody
smbpasswd -an nobody
This also creates a Linux account - nobody. Please  make sure nobody has access to " /u01/app/oracle/oradata/orcl " in Linux, not only to orcl itself, also its parent directories.

5. Create user "demo"

smbpasswd -a demo

6. Testing Samba configuration

testparm

7. Starting Samba and NetBIOS Name Services on Linux

service smb start
service  nmb start

chkconfig smb on
chkconfig nmb on

To check status: 
service smb status
service  nmb status

8. Mount on Windows and Linux

Now, you've completed a basic Samba server setup on Linux. On Windows, click "Tools" -< "Map Network Driver", enter "\\odilab\online_log" for Folder, select a Drive, and click OK, you're all set.

On Oracle Linux, user can run the following command to look for shared resources from Samba server - 
smbclient -L odilab

smbclient \\\\odilab\\online_log work like ftp command.

To mount, you have two options: smbfs and cifs. Smbfs is deprecated. 
mount -t cifs -o guest //odilab/online_log /home/oracle/online_log
Unmount: umount /home/oracle/online_log
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值