当前位置: 技术问答>linux和unix
samba有关网域用户问题,大侠进
来源: 互联网 发布时间:2017-01-14
本文导语: 【smb.conf】 [global] passdb backend = smbpasswd workgroup = ADTEST2 security = ADS server string = ad nas encrypt passwords = Yes username level = 0 username map = /mnt/base/etc/smbusers map to guest = Bad User template shell = /bin/sh template homedir...
【smb.conf】
[global]
passdb backend = smbpasswd
workgroup = ADTEST2
security = ADS
server string = ad nas
encrypt passwords = Yes
username level = 0
username map = /mnt/base/etc/smbusers
map to guest = Bad User
template shell = /bin/sh
template homedir = /home/%D/%U
null passwords = yes
winbind use default domain = no
max log size = 10
socket options = TCP_NODELAY SO_KEEPALIVE SO_SNDBUF=262144 SO_RCVBUF=131027
os level = 20
config file = /etc/smb.conf
smb passwd file = /mnt/base/etc/smbp
guest account = guest
directory mask = 0777
create mask = 0777
oplocks = yes
locking = yes
load printers = yes
printcap name = /etc/lprng/printcap
disable spoolss = yes
winbind separator = +
winbind cache time = 3600
winbind enum groups = yes
winbind enum users = yes
idmap gid = 30001-300000
idmap uid = 30001-300000
pam password change = yes
password server = 016447ec.adtest2.net
realm = adtest2.net
【krb5.conf】
[libdefault]
default_realm = ADTEST2.NET
[realms]
ADTEST2.NET = {
kdc = adtest2.net
default_domain = ADTEST2.NET
}
[domain_realms]
016447ec.adtest2.net = ADTEST2.NET
samba已经加入到域ADTEST2.NET
root@samba# wbinfo -u //能获取到域用户
NOONTEC+xpple
NOONTEC+admin
ADTEST2+administrator
ADTEST2+guest
ADTEST2+krbtgt
ADTEST2+adtest$
root@samba# wbinfo -g
ADTEST2+domain computers
ADTEST2+domain controllers
ADTEST2+schema admins
ADTEST2+enterprise admins
ADTEST2+cert publishers
ADTEST2+domain admins
ADTEST2+domain users
ADTEST2+domain guests
ADTEST2+group policy creator owners
ADTEST2+ras and ias servers
ADTEST2+dnsadmins
ADTEST2+dnsupdateproxy
ADTEST2+hardware
root@samba# getent passwd
root:x:0:0:root:/:/bin/bash
sshd:x:1:1:sshd:/:/bin/sh
mysql:x:2:2:mysql:/dev/null:/bin/false
daemon:x:3:5:daemon:/:/bin/false
admin:x:4:3:nas user:/:/bin/sh
TimeMachine:x:1000:1000:Linux User,,,:/home/TimeMachine:/bin/sh
guest:x:1001:1001:Linux User,,,:/home/guest:/bin/sh
rsync:x:1002:0:Linux User,,,:/home/rsync:/bin/sh
xpple:x:5:4:nas user:/home:/bin/false
getpasswd不能显示域用户,怎么搞的啊?域用户没映射到本地来啊!急 啊 弄in了一个星期了!!
[global]
passdb backend = smbpasswd
workgroup = ADTEST2
security = ADS
server string = ad nas
encrypt passwords = Yes
username level = 0
username map = /mnt/base/etc/smbusers
map to guest = Bad User
template shell = /bin/sh
template homedir = /home/%D/%U
null passwords = yes
winbind use default domain = no
max log size = 10
socket options = TCP_NODELAY SO_KEEPALIVE SO_SNDBUF=262144 SO_RCVBUF=131027
os level = 20
config file = /etc/smb.conf
smb passwd file = /mnt/base/etc/smbp
guest account = guest
directory mask = 0777
create mask = 0777
oplocks = yes
locking = yes
load printers = yes
printcap name = /etc/lprng/printcap
disable spoolss = yes
winbind separator = +
winbind cache time = 3600
winbind enum groups = yes
winbind enum users = yes
idmap gid = 30001-300000
idmap uid = 30001-300000
pam password change = yes
password server = 016447ec.adtest2.net
realm = adtest2.net
【krb5.conf】
[libdefault]
default_realm = ADTEST2.NET
[realms]
ADTEST2.NET = {
kdc = adtest2.net
default_domain = ADTEST2.NET
}
[domain_realms]
016447ec.adtest2.net = ADTEST2.NET
samba已经加入到域ADTEST2.NET
root@samba# wbinfo -u //能获取到域用户
NOONTEC+xpple
NOONTEC+admin
ADTEST2+administrator
ADTEST2+guest
ADTEST2+krbtgt
ADTEST2+adtest$
root@samba# wbinfo -g
ADTEST2+domain computers
ADTEST2+domain controllers
ADTEST2+schema admins
ADTEST2+enterprise admins
ADTEST2+cert publishers
ADTEST2+domain admins
ADTEST2+domain users
ADTEST2+domain guests
ADTEST2+group policy creator owners
ADTEST2+ras and ias servers
ADTEST2+dnsadmins
ADTEST2+dnsupdateproxy
ADTEST2+hardware
root@samba# getent passwd
root:x:0:0:root:/:/bin/bash
sshd:x:1:1:sshd:/:/bin/sh
mysql:x:2:2:mysql:/dev/null:/bin/false
daemon:x:3:5:daemon:/:/bin/false
admin:x:4:3:nas user:/:/bin/sh
TimeMachine:x:1000:1000:Linux User,,,:/home/TimeMachine:/bin/sh
guest:x:1001:1001:Linux User,,,:/home/guest:/bin/sh
rsync:x:1002:0:Linux User,,,:/home/rsync:/bin/sh
xpple:x:5:4:nas user:/home:/bin/false
getpasswd不能显示域用户,怎么搞的啊?域用户没映射到本地来啊!急 啊 弄in了一个星期了!!
|
不如startx之后用system-config-samba配置共享吧,
三步:
1、设置samba用户
2、设置共享目录
3、重启samba服务
三步:
1、设置samba用户
2、设置共享目录
3、重启samba服务