Using Samba 2.2.7 on Mandrake 9.0 as a PDC.
Problem: Samba doesn't create machine accounts automatically, more importantly it doesn't create the Linux account in passwd. Two sets of entries turn up in the logs, one in auth.log and the other in messages. I've tried using root (created in smbpasswd) and an account that is part of the domain admin group.
The error that pops up when I try and join the Domain from a Win2K PC is "The account used is a computer account. Use your global user or local user account to access this server.". For practical and security reasons the PDC needs to be able to create machine accounts on the fly.
The problem appears to revolve around the adduser / useradd (tried both), but I've hit a wall and google has been exhausted. Any advice in the regard will be most appreciated
messages
Mar 2 22:39:04 rhino smbd[29522]: [2003/03/02 22:39:04, 0] rpc_server/srv_samr_nt.c:_api_samr_create_user(1929)
Mar 2 22:39:04 rhino smbd[29522]: User drew$ does not exist in system password file (usually /etc/passwd). Cannot add account without a valid local system user.
Mar 2 22:39:04 rhino smbd[29522]:
Mar 2 22:39:05 rhino smbd[29522]: [2003/03/02 22:39:05, 0] rpc_server/srv_netlog_nt.c:get_md4pw(176)
Mar 2 22:39:05 rhino smbd[29522]: get_md4pw: Workstation drew$: no account in domain
auth.log
Mar 3 20:10:03 rhino adduser[7499]: failed adding user `', data deleted
Here's the global and [netlogon] section of my smb.conf:
NOTE: the group machines exists
[global]
workgroup = IT
netbios name = RHINO
netbios aliases = SOFTWARE
server string = IT Software Server
encrypt passwords = Yes
min passwd length = 0
map to guest = Bad User
null passwords = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *new*password* %n\n *new*password* %n\n *successfully*
unix password sync = Yes
syslog only = Yes
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
load printers = No
printcap name = lpstat
show add printer wizard = No
domain admin group = ccarg, @adm
add user script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M %U
delete user script = /usr/sbin/deluser %U
domain logons = Yes
os level = 33
lm announce = Yes
preferred master = Yes
domain master = Yes
dns proxy = No
wins server = 146.231.128.6
guest account = guest
read list = guest
guest ok = Yes
printing = cups
default case = upper
short preserve case = No
[netlogon]
path = /etc/samba/netlogon
write list = ntadmin
guest ok = No