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 ...
随机推荐
- ajax的回调函数
ajax的回调函数(done,fail,always) 观看代码: $.ajax({ type: "post",//请求的类型 url: "/book/detail?ac ...
- Dubbo架构与底层实现
一.Dubbo的设计角色 (1)系统角色Provider: 暴露服务的服务提供方.Consumer: 调用远程服务的服务消费方.Registry: 服务注册与发现的注册中心.1Monitor: 统计服 ...
- sql如何判断表字段是否存在默认值
if exists(SELECT 1 FROM sys.tables t INNER JOIN sys.columns c ON ...
- python-Web-django-后台
url: # member 处理 re_path('member/list/', member.list, name='member/list/'), re_path('member/list_par ...
- web题-自己做的
@sqlmap工具注入 sql基础教程https://jingyan.baidu.com/article/eae078276530621fec5485b9.html 最后啥都有了查询flag表的fla ...
- 一、linux基础命令
一. 常用系统工作命令 1.echo 命令 echo命令用于在终端输出字符串或者变量提取后的值 echo $SHELL 2.date命令 date命令用于显示及设置系统的时间或者日期 参数 ...
- JQ scrollTop 无效的场景
先要设置DOM为显示,然后在设置scrollTop,先后顺序不能调换.
- SecureCRT设置 log file
SecureCRT设置 log filelog file name:D:\1-SecureCRT-log\com-6\%S_%Y%M%D_%h.log on each line:[%Y%M%D_%h: ...
- Min swaps to sort array
Given an array with distinct numbers, return an integer indicating the minimum number of swap operat ...
- Find Duplicate File in System
Given a list of directory info including directory path, and all the files with contents in this dir ...