Migrating authentication of Samba from smbpasswd to tdb
Was addicted various After you upgrade the OS of old Samba server. Put it also was using a set of 2.x era become 3.x is seems to have emerged.
Changes in 3.x
Format and location of the standard password file has been modified in 3.x.
/etc/smbpasswd /var/lib/samba/passdb.tdb
Also pdbedit command is provided for the administrator. And though it must have administrator privileges, and powerful general-purpose than smbpasswd.
Check the setting
by extracting a set of smb.conf in testparm command to confirm that the tdbsam is specified in the authentication DB.
% testparm -s /etc/samba/smb.conf ... passdb backend = tdbsam ... %
I make passdb.tdb from old smbpasswd file
Copy smbpasswd.bak to work for in the / etc and / var / backups.
% sudo cp /etc/smbpasswd.bak /var/lib/samba/smbpasswd.txt
I to convert pdbedit.
% sudo pdbedit -i smbpasswd:/var/lib/samba/smbpasswd.txt \ -e tdbsam:/var/lib/samba/smbpasswd.tdb
Retry fix the problem and get an error. This time I was simply remove the bad line.
% sudo vi /var/lib/samba/smbpasswd.txt (remove invalid users) % sudo rm /var/lib/samba/smbpasswd.tdb (try again)
I replace the password file.
% sudo /etc/init.d/samba stop % sudo mv /var/lib/samba/passdb.tdb{,.bak} % sudo mv /var/lib/samba/{smbpasswd,passdb}.tdb % sudo /etc/init.d/samba restart
To test if you can logon.
% smbclient --debuglevel=3 //192.168.0.x/jdoe -U jdoe (jdoe's smb password) smb: \> exit %
Troubleshooting
Really sure the user is registered.
% sudo pdbedit -u jdoe -v
To register it if it is not registered.
% sudo pdbedit -a -u jdoe
Reference
IT: Whole picture revised version of Samba 3.0 [Part II] (3/3) / Takahashi Motonobu support of a variety of authentication database
http://www.atmarkit.co.jp/flinux/special/samba3b/samba06.html
Migrating authentication of Samba from smbpasswd to tdb的更多相关文章
- Samba passwd smbpasswd and tdbsam
ome commands to convert samba backend password-databases. If you use "passdb backend = smbpassw ...
- SWAT—Samba WEB管理工具
本文试验环境是RHEL5.2+samba-swat-3.0.28.Server的IP是192.168.120.241. 1. swat介绍 SWAT:The Samba WEB Administr ...
- 将 LDAP 目录用于 Samba 认证
原文地址: http://www.ibm.com/developerworks/cn/education/linux/smb-ldap/smb-ldap.html 开放源码 Samba 将 Unix ...
- samba完美安装
感觉是一个相当强大的东西. Samba是在Linux和UNIX系统上实现SMB协议的一个免费软件.它为局域网内的不同计算机之间提供文件及打印机等资源的共享服务.为客户机/服务器型协议,客户机通过该协议 ...
- 配置samba服务器
公司需要一台用于共享的文件服务器,考虑使用Linux系统,听说会比windows的文件系统好管理,了解不多,人云亦云了! 这里需要用到samba系统,安装比较简单,安装后需要进行配置才能访问. 修改s ...
- linux共享文件samba安装与java读取外部文件夹方法
测试环境RedHat 6.4 一.安装 samba组件安装: (1)首先用“rpm –qa |grep samba”命令检验系统samba服务是否安装. #rpm –qa |grep samba sa ...
- samba和squid 安装
一. samba配置1. 什么是sambaSamba服务类似于windows上的共享功能,可以实现在Linux上共享文件,windows上访问,当然在Linux上也可以访问到.是一种在局域网上共享文件 ...
- Linux下samba的安装与配置
背景 在window7下面虚拟了一个CentOS6.3,为了学习命令行就没有装图形包,所以我的CentOS是黑屏的那种,呵呵,当然了,VMWare提供 的增强功能我就不能用了(或许能 ...
- samba服务器概述
一.samba服务器概述 Samba是一个能让Linux系统应用Microsoft网络通信协议的软件.而SMB是Server Message Block的缩写,即为服务器消息块.SMB主要作为Micr ...
随机推荐
- JAVA 基础编程练习题13 【程序 13 根据条件求数字】
13 [程序 13 根据条件求数字] 题目:一个整数,它加上 100 后是一个完全平方数,再加上 168 又是一个完全平方数,请问该数是多少? 程序分析:在 10 万以内判断,先将该数加上 100 后 ...
- 1. hadoop使用启动命令时报错之分析解决
今天在学习hadoop启动命令的时候,先jps看了下,发现namenode.datanode都开着,所以想要先停止这些服务,结果输入命令后报错:“WARN util.NativeCodeLoader: ...
- Java类的加载及初始化
每个类的编译代码都存在于它自己的独立文件中,该文件在需要使用该程序代码时才会被加载.通常有以下三种加载情况: (1) 访问了子类的静态变量或静态方法:仅对类的静态变量,静态块执行初始化操作,并仅初始化 ...
- flask(1.0)
目录 一. 关于KeyError和IndexError 二. Python三大主流框架对比 三. flask基础 1.安装flask 2.用flask写出的第一个页面 3.Flask的Response ...
- Centos7搭建主从DNS服务器
1.准备 例:两台192.168.11.10(主),192.168.11.11(从),域名www.test1.com # 主从DNS服务器均需要安装bind.bind-chroot.bind-util ...
- 2019icpc银川网络赛
外面吵得风生水起,我校平静地在打比赛,丝毫不知道这次比赛的题目就是把2018银川邀请赛的题照搬过来了QAQ,主办方真牛逼.. A Maximum(思维) 题意:维护一个栈,支持入栈和出栈操作,并计算每 ...
- 11.把文本文件的数据导入到Hive表中
先在hive里面创建一个表 create table mydb2.t3(id int,name string,age int) row format delimited fields terminat ...
- [转帖]k8s国内镜像
k8s国内镜像 https://www.jianshu.com/p/b9fecdb5e3a7 wu_sphinx 关注 2019.05.06 20:43* 字数 155 阅读 628评论 0喜欢 0 ...
- 【转帖】docker-get拉取镜像
docker-get拉取镜像 题目很诱人 找时间测试一下 是否可以翻越长城下载镜像. https://www.cnblogs.com/fuyuteng/p/10904495.html docker-g ...
- Photon Server初识(二) ---通过NHibernate 映射数据库
一.下载 NHibernate.dill 官网:https://nhibernate.info 或者通过NuGet下载(详情看上一节) 二.新建一个项目,并引入包 引入包 三.配置(重点) 1.配置x ...