[Samba] Samba PDC adding new user, profile dir is not created
J. Echter
j.echter at elektro-mayer-echter.de
Wed Mar 16 10:34:35 MDT 2011
Am 16.03.2011 17:21, schrieb TAKAHASHI Motonobu:
> From: "J. Echter"<j.echter at elektro-mayer-echter.de>
> Date: Wed, 16 Mar 2011 11:09:59 +0100
>
>> i have a Samba PDC (no LDAP) and added add user script to my config.
>>
>> I can create the user with no problems, login is possible but the
>> /home/samba/profile/user dir is not created.
>>
>> Any hints on that?
> You should show us enough information for us to re-produce such as
> all content of smb.conf and related settings:
>
> In my lab, profile dir is successfully created. My env is...
>
> - Debian lenny (hostname is "lenny5") + self-compiled Samba 3.5.6
> - my smb.conf and shares
>
> ---
> [global]
> workgroup = SAMBA
> domain logons = yes
> add machine script = useradd %u
> map to guest = bad user
>
> logon path = \\lenny5\profiles\%U
>
> [homes]
> writeable = yes
> browseable = no
>
> [profiles]
> path = /var/lib/samba/shares/profiles
> guest ok = yes
> browseable = no
> create mask = 0600
> directory mask = 0700
> writeable = yes
> ---
>
> # ls -lR /var/lib/samba
> /var/lib/samba/:
> total 4
> drwxr-xr-x 6 root root 4096 2011-03-15 20:48 shares
>
> /var/lib/samba/shares:
> total 16
> drwxrwxrwx 6 root root 4096 2011-03-17 01:07 profiles
>
> - Created a user:
>
> # useradd -d /var/home/test01 test01
> # smbpasswd -a test01
> # pdbedit -v test01
> ...
> Profile Path: \\lenny5\profiles\test01
> ...
>
>
> - When I logon as test01 from Windows XP workstation which is already
> joined to the "SAMBA" domain and logoff, profiles are created like:
>
> # ls -lR /var/lib/samba
> total 4
> drwxr-xr-x 6 root root 4096 2011-03-15 20:48 shares
>
> /var/lib/samba/shares:
> total 16
> drwxrwxrwx 6 root root 4096 2011-03-17 01:07 profiles
>
> /var/lib/samba/shares/profiles:
> total 16
> drwx------ 13 test01 test01 4096 2011-03-17 01:08 test01
>
> /var/lib/samba/shares/profiles/test01:
> total 568
> drwx------ 3 test01 test01 4096 2010-10-11 01:10 Start Menu
> drwx------ 2 test01 test01 4096 2010-10-11 01:10 Desktop
> drwx------ 4 test01 test01 4096 2011-03-17 01:08 Application Data
> drwx------ 2 test01 test01 4096 2010-10-11 01:18 Cookies
> drwx------ 3 test01 test01 4096 2011-03-17 01:08 Favorites
> drwx------ 4 test01 test01 4096 2011-03-17 01:08 My Documents
> drwx------ 2 test01 test01 4096 2010-10-11 01:10 NetHood
> -rw------- 1 test01 test01 524288 2011-03-17 01:08 NTUSER.DAT
> -rw------- 1 test01 test01 1024 2011-03-17 01:08 ntuser.dat.LOG
> -rw------- 1 test01 test01 270 2011-03-17 01:08 ntuser.ini
> ...
>
> ---
> TAKAHASHI Motonobu<monyo at monyo.com>
smb.conf
[global]
printing = bsd
netbios name = PDC
server string = PDC (%h)
workgroup = workgroup
interfaces = eth0,lo
security = user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n
*Retype\snew\sUNIX\spassword:* %n\n .
local master = yes
preferred master = yes
os level = 200
domain master = yes
domain logons = yes
add user script = /usr/sbin/useradd -m '%u' -g ntusers -G ntusers -s
/bin/false
delete user script = /usr/sbin/userdel -r '%u'
add group script = /usr/sbin/groupadd '%g'
delete group script = /usr/sbin/groupdel '%g'
delete group script = /usr/sbin/groupdel '%g'
add user to group script = /usr/sbin/usermod -G '%g' '%u'
add machine script = /usr/sbin/useradd -s /bin/false -d
/var/lib/nobody '%u' -g machines
logon path = \\%L\profile\%U
logon drive = h:
logon script = %U.bat
profile acls = yes
hide files = /desktop.ini/ntuser.ini/NTUSER.*/Thumbs.db/
wins support = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
log level = 12
panic action = /usr/share/samba/panic-action %d
use sendfile = yes
[homes]
comment = Home Directories
browseable = no
valid users = %S
writeable = yes
create mode = 0600
directory mode = 0700
[profile]
comment = Profildateien
path = /home/samba/profile
guest ok = yes
browseable = no
create mask = 0600
directory mask = 0700
writeable = yes
[netlogon]
comment = Network Logon Service
path = /home/samba/netlogon
guest ok = yes
writeable = no
share modes = no
ls -lR /home/samba/profile
/home/samba/profile:
total 60
drwx------ 16 info root 4096 Mar 16 16:48 info
drwx------ 15 root root 4096 Oct 28 11:10 root
all manually added users are logged in fine, and all get their profile
dir loaded from pdc.
thanks, and greetings.
More information about the samba
mailing list