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的更多相关文章

  1. Samba passwd smbpasswd and tdbsam

    ome commands to convert samba backend password-databases. If you use "passdb backend = smbpassw ...

  2. SWAT—Samba WEB管理工具

    本文试验环境是RHEL5.2+samba-swat-3.0.28.Server的IP是192.168.120.241.   1. swat介绍 SWAT:The Samba WEB Administr ...

  3. 将 LDAP 目录用于 Samba 认证

    原文地址: http://www.ibm.com/developerworks/cn/education/linux/smb-ldap/smb-ldap.html 开放源码 Samba 将 Unix ...

  4. samba完美安装

    感觉是一个相当强大的东西. Samba是在Linux和UNIX系统上实现SMB协议的一个免费软件.它为局域网内的不同计算机之间提供文件及打印机等资源的共享服务.为客户机/服务器型协议,客户机通过该协议 ...

  5. 配置samba服务器

    公司需要一台用于共享的文件服务器,考虑使用Linux系统,听说会比windows的文件系统好管理,了解不多,人云亦云了! 这里需要用到samba系统,安装比较简单,安装后需要进行配置才能访问. 修改s ...

  6. linux共享文件samba安装与java读取外部文件夹方法

    测试环境RedHat 6.4 一.安装 samba组件安装: (1)首先用“rpm –qa |grep samba”命令检验系统samba服务是否安装. #rpm –qa |grep samba sa ...

  7. samba和squid 安装

    一. samba配置1. 什么是sambaSamba服务类似于windows上的共享功能,可以实现在Linux上共享文件,windows上访问,当然在Linux上也可以访问到.是一种在局域网上共享文件 ...

  8. Linux下samba的安装与配置

    背景          在window7下面虚拟了一个CentOS6.3,为了学习命令行就没有装图形包,所以我的CentOS是黑屏的那种,呵呵,当然了,VMWare提供 的增强功能我就不能用了(或许能 ...

  9. samba服务器概述

    一.samba服务器概述 Samba是一个能让Linux系统应用Microsoft网络通信协议的软件.而SMB是Server Message Block的缩写,即为服务器消息块.SMB主要作为Micr ...

随机推荐

  1. 一百二十三:CMS系统之登录功能

    配置文件中加入前台用户的身份标识 form class SigninForm(BaseForm): telephone = StringField(validators=[Regexp(r'1[345 ...

  2. python3速查参考- python基础 4 -> 元组 + 字典 + 字符串 的学习

    元组 元组:特点就是内容不可变,算只读的列表,可以被查询,不能被修改 a = 2, print(a) print(type(a)) b = ('a','b','c') print(b[1]) 运行结果 ...

  3. vue中数组检测重复性的两个方法

    检查数组重复(一)let inputValue = this.positionGroupInput[groupId].inputValue; if (inputValue) { for (let po ...

  4. lamp的动静分离部署

    一.lamp分离部署工作图 二.LAMP的安装与配置 1.环境准备 2.对 PHP 服务器进行部署 #以下为安装PHP及其依赖 [root@php ~ ]# .tar.gz -C /usr/src [ ...

  5. Leetcode之动态规划(DP)专题-714. 买卖股票的最佳时机含手续费(Best Time to Buy and Sell Stock with Transaction Fee)

    Leetcode之动态规划(DP)专题-714. 买卖股票的最佳时机含手续费(Best Time to Buy and Sell Stock with Transaction Fee) 股票问题: 1 ...

  6. Job的运行过程

    Job的运行过程 Job的具体运行过程 a) 运行mapred程序 b) 本次运行将生成一个Job,于是JobClient向JobTracker(ResourceManager)申请一个JobId以标 ...

  7. LeetCode之链表总结

    链表提供了高效的节点重排能力,以及顺序性的节点访问方式,并且可以通过增删节点来灵活地调整链表的长度.作为一种常用的数据结构,链表内置在很多高级编程语言里面.既比数组复杂又比树简单,所以链表经常被面试官 ...

  8. Oracle-DQL 5- 分组函数(多行函数)

    分组函数(多行函数):--针对表中的多行数据进行运算,返回一个结果 1.多行函数 --sum() 求和SELECT SUM(sal) FROM emp; --avg() 求平均值SELECT AVG( ...

  9. windows下安装和配置SNMP

    window snmp服务开启及测试 转自:https://blog.csdn.net/qq_33314107/article/details/80031446 一 安装 二 开启服务 Linux下安 ...

  10. mysql oracle postgresql 体系架构对比

    2个角度sqlservermysqloracle 12cpostgresql如果从create database角度来看 那么一个实例是可以对应多个数据库的~如果从实例和磁盘上的数据库文件(数据文件. ...