我在Debian Wheezy上使用Samba 4.0.0beta2作为Active Directory域控制器。 我也在/etc/nsswitch.conf
使用winbind,所以getent passwd
返回域用户。
我已经设定了
template homedir = /home/%U
在我的smb.conf
文件中,而不是用%U
代替用户名, getent passwd
返回:
HOME\Administrator:*:0:100::/home/%U:/bin/bash HOME\Guest:*:3000000:3000001::/home/%U:/bin/bash
这是为什么?
Samba4以来的价值已经发生了变化,
用户名的新值是%ACCOUNTNAME%,使用方法如下:
template homedir = /home/%ACCOUNTNAME%