免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1260 | 回复: 1
打印 上一主题 下一主题

[服务应用] Redhat Samba转移centos Samba 后异常 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2017-05-12 14:01 |只看该作者 |倒序浏览

操作过程,将RedHat中etc下面的 passwd group gshadow shadow 和带~的8个文件全部覆盖的centos里面
在用webmin转换成samba用户,然后将samba/password里面的文件直接替换成原来的samba 用户密码
现在是samba看不到用户信息,但是可以使用。能看到五个其他都无法看到。不知道什么原因请大家帮忙看看。






Redhat版本
[root@hx]# lsb_release -a
LSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 5.2 (Tikanga)
Release:        5.2
Codename:       Tikanga

RedHat Samba版本
samba-3.0.28-0.el5.8




Centos版本
LSB Version:        :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID:        CentOS
Description:        CentOS release 6.5 (Final)
Release:        6.5
Codename:        Final

Centos Smaba版本

samba-3.6.9-164.el6.x86_64


smb.conf 配置
[global]
workgroup = MYGROUP
        server string = Samba Server Version %v
        dns proxy = no
;        netbios name = MYSERVER

;        interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
;        hosts allow = 127. 192.168.12. 192.168.13.

        log file = /var/log/samba/log.%m
        # max 50KB per log file, then rotate
        max log size = 50
        guest ok = yes


        security = user
        passdb backend = smbpasswd
        smb passwd file = /etc/samba/smbpasswd
        username map = /etc/samba/smbusers

;        realm = MY_REALM

;        password server = <NT-Server-Name>

;        domain master = yes
;        domain logons = yes

        # the login script name depends on the machine name
;        logon script = %m.bat
        # the login script name depends on the unix user used
;        logon script = %u.bat
;        logon path = \\%L\Profiles\%u
        # disables profiles support by specifing an empty path
;        logon path =         

;        add user script = /usr/sbin/useradd "%u" -n -g users
;        add group script = /usr/sbin/groupadd "%g"
;        add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
;        delete user script = /usr/sbin/userdel "%u"
;        delete user from group script = /usr/sbin/userdel "%u" "%g"
;        delete group script = /usr/sbin/groupdel "%g"

;        local master = no
;        os level = 33
;        preferred master = yes

;        wins support = yes
;        wins server = w.x.y.z
;        wins proxy = yes

;        load printers = yes
        cups options = raw

;        printcap name = /etc/printcap
        #obtain list of printers automatically on SystemV
;        printcap name = lpstat
;        printing = cups

;        map archive = no
;        map hidden = no
;        map read only = no
;        map system = no
;        store dos attributes = yes


#============================ Share Definitions ==============================
[homes]
        comment = Home Directories
        browseable = no
        writeable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
;   comment = Network Logon Service
;   path = /usr/local/samba/lib/netlogon
;   guest ok = yes
;   writable = no
;   share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
;    path = /usr/local/samba/profiles
;    browseable = no
;    guest ok = yes


# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
        comment = All Printers
        path = /usr/spool/samba
        browseable = no
# Set public = yes to allow user 'guest account' to print
;        guest ok = no
;        writeable = No
        printable = yes

# This one is useful for people to share files
;[tmp]
;   comment = Temporary file space
;   path = /tmp
;   read only = no
;   public = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
;   comment = Public Stuff
;   path = /home/samba
;   public = yes
;   writable = yes
;   printable = no
;   write list = @staff

# Other examples.
#
# A private printer, usable only by fred. Spool data will be placed in fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;[fredsprn]
;   comment = Fred's Printer
;   valid users = fred
;   path = /homes/fred
;   printer = freds_printer
;   public = no
;   writable = no
;   printable = yes

# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
;   comment = Fred's Service
;   path = /usr/somewhere/private
;   valid users = fred
;   public = no
;   writable = yes
;   printable = no

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %U option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
;  comment = PC Directories
;  path = /usr/pc/%m
;  public = no
;  writable = yes

# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;[public]
;   path = /usr/somewhere/else/public
;   public = yes
;   only guest = yes
;   writable = yes
;   printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
;   comment = Mary's and Fred's stuff
;   path = /usr/somewhere/shared
;   valid users = mary fred
;   public = no
;   writable = yes
;   printable = no
;   create mask = 0765

论坛徽章:
0
2 [报告]
发表于 2017-05-12 15:22 |只看该作者
别沉了~~~》~~~
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP