博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[20160921]linux下建立samba服务器.txt
阅读量:6451 次
发布时间:2019-06-23

本文共 3113 字,大约阅读时间需要 10 分钟。

[20160921]linux下建立samba服务器.txt

--工作需要,需要在linux下配置samba服务。好久不做这些事情,做一个安装笔记:

1.安装samba软件包

# rpm -qa | grep samba
samba-client-3.0.33-3.39.el5_8
samba-common-3.0.33-3.39.el5_8
samba-3.0.33-3.39.el5_8

--注意安装samba-3.0.33-3.39.el5_8需要 perl-Convert-ASN1-0.20-1.1.noarch.rpm包。

2.修改配置文件:

[backup]

    comment = backup Stuff
    path = /u01/backup
    public = yes
    writable = yes
    printable = no

--我配置比较简单,先考虑能用先:

chmod 777 /u01/backup

--看了配置文件/etc/samba/smb.conf:

# ----------------------- Standalone Server Options ------------------------
#
# Security can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.

    security = user

    passdb backend = tdbsam

--其他方式share(deprecated) or server(deprecated)好像废除了。不过我还是先测试看看。修改如下:

    security = share

;   passdb backend = tdbsam

3.启动服务:

# service smb  restart
Shutting down SMB services:                                [  OK  ]
Shutting down NMB services:                                [  OK  ]
Starting SMB services:                                     [  OK  ]
Starting NMB services:                                     [  OK  ]

4.在我本机测试:

--//在我的电脑上输入:
\\192.168.100.78\backup

5.下面测试使用密码的方式:

--修改配置文件/etc/samba/smb.conf:
    security = user
    passdb backend = tdbsam

# cat /etc/passwd | mksmbpasswd.sh >| /etc/samba/smbpasswd

# smbpasswd root

New SMB password:
Retype new SMB password:
Failed to find entry for user root.
Failed to modify password entry for user root

--这里报错,修改如下,再次执行smbpasswd root 。ok!

    passdb backend = smbpasswd
--不对这个是缺省模式。
--看了一些相关文档

# service smb  restart

Shutting down SMB services:                                [  OK  ]
Shutting down NMB services:                                [  OK  ]
Starting SMB services:                                     [  OK  ]
Starting NMB services:                                     [  OK  ]

--这样使用口令,能看到共享磁盘。

6.下面测试使用密码的方式:

--修改配置文件/etc/samba/smb.conf:
    security = user
    passdb backend = tdbsam

[backup]

    comment = backup Stuff
    path = /u01/backup
    valid users=root oracle
    public = yes
    writable = yes
    printable = no
#   write list = +staff

--参考了链接http://blog.csdn.net/tg5156/article/details/8865775。

# pdbedit -x oracle

# pdbedit -a oracle
new password:
retype new password:
Unix username:        oracle
NT username:
Account Flags:        [U          ]
User SID:             S-1-5-21-375937087-413791906-1356901787-1007
Primary Group SID:    S-1-5-21-375937087-413791906-1356901787-513
Full Name:
Home Directory:       \\gxqyydg4\oracle
HomeDir Drive:
Logon Script:
Profile Path:         \\gxqyydg4\oracle\profile
Domain:               GXQYYDG4
Account desc:
Workstations:
Munged dial:
Logon time:           0
Logoff time:          never
Kickoff time:         never
Password last set:    Wed, 21 Sep 2016 08:54:45 CST
Password can change:  Wed, 21 Sep 2016 08:54:45 CST
Password must change: never
Last bad password   : 0
Bad password count  : 0
Logon hours         : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

--再次测试ok。

7.顺便测试windows下oracle数据使用rman的情况,太稳定了,经常报错。

channel ORA_DISK_3: starting piece 1 at 2016-09-20 17:34:54

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 09/20/2016 17:35:29
ORA-19502: write error on file "\\192.168.100.78\BACKUP\FULL_0SRG9VT9_1_1.BAK", block number 19072 (block size=8192)
ORA-27070: async read/write failed
OSD-04016: Error queuing an asynchronous I/O request.
O/S-Error: (OS 64) 指定的网络名不再可用。

--放弃!

你可能感兴趣的文章
Python爬虫综述(笔记)
查看>>
Scala之柯里化和隐式转换
查看>>
Merge and BottomUpSort
查看>>
reids 安装记录
查看>>
获取androdmanifest里面的meta-data
查看>>
mysql拷贝表的几种方式
查看>>
NetApp FAS2240-4存储删除文件数据恢复
查看>>
用设计模式去掉没必要的状态变量 —— 状态模式
查看>>
linux安装elasticsearch及遇到的各种问题
查看>>
健忘的正则
查看>>
[转]CMake快速入门教程:实战
查看>>
IntelliJ IDEA创建JavaWeb工程及配置Tomcat部署
查看>>
Markdown用法
查看>>
求最大值及其下标
查看>>
Request header is too large
查看>>
轮播插件swiper.js?
查看>>
网路流24题总结
查看>>
BZOJ-3732 Network 图论 最小生成树 倍增
查看>>
python之文件操作
查看>>
15 个 Android 通用流行框架大全
查看>>