[KLUG Members] Help! Samba LDAP 2.2.8a - can't add a machine

Jim C. members@kalamazoolinux.org
Fri, 09 Jan 2004 13:20:23 -0800


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Background:

samba-server-ldap-2.2.8a-13mdk
samba-client-2.2.8a-13mdk
samba-swat-ldap-2.2.8a-13mdk
samba-winbind-ldap-2.2.8a-13mdk
nss_ldap-207-4.1.92mdk
openldap-2.1.22-5mdk
pam_ldap-164-4.1.92mdk

I'm really quite confused by this.

As shown, I can add a machine from the command line with no trouble.

[root@testbox root]# /usr/share/samba/scripts/smbldap-useradd.pl -w -d
/dev/null -g machines -c 'Machine Account' -s /bin/false dummyacct
[root@testbox samba]# getent passwd | grep dummyacct
dummyacct$:x:1003:421:dummyacct$:/dev/null:/bin/false
[root@testbox samba]#

Scripts seem to have the correct group & permissions:

[root@testbox samba]# ls -la /etc/samba/smbldap_conf.pm
- -rw-r-----    1 root     adm          7041 Jan  8 13:06 smbldap_conf.pm
[root@testbox samba]# ls -la /usr/share/samba/scripts/ | grep adm
- -rwxr-x---    1 root     adm          2389 Jan  8 22:22
smbldap-groupadd.pl*
- -rwxr-x---    1 root     adm          2369 Nov 17 10:13
smbldap-groupdel.pl*
- -rwxr-x---    1 root     adm          5362 Nov 17 10:13
smbldap-groupmod.pl*
- -rwxr-x---    1 root     adm          1821 Nov 17 10:13
smbldap-groupshow.pl*
- -rwxr-x---    1 root     adm          6932 Nov 17 10:13
smbldap-migrate-accounts.pl*
- -rwxr-x---    1 root     adm          4883 Nov 17 10:13
smbldap-migrate-groups.pl*
- -rwxr-x---    1 root     adm          4994 Nov 17 10:13 smbldap-passwd.pl*
- -rwxr-x---    1 root     adm          7147 Nov 17 10:13
smbldap-populate.pl*
- -rwxr-x---    1 root     adm         13432 Jan  8 22:21
smbldap-useradd.pl*
- -rwxr-x---    1 root     adm          2913 Nov 17 10:13
smbldap-userdel.pl*
- -rwxr-x---    1 root     adm         10697 Nov 17 10:13
smbldap-usermod.pl*
- -rwxr-x---    1 root     adm          1762 Nov 17 10:13
smbldap-usershow.pl*
[root@testbox samba]#

Samba seems to be configured correctly:

[root@testbox samba]# cat smbusers
# Unix_name = SMB_name1 SMB_name2 ...
root = @adm Administrator administrator root admin @Administrators
nobody = guest pcguest smbguest

...and yet I can't get Samba to add a machine account automatically.
I wrote a test script:

#!/bin/bash
echo `date` 1> output.txt
/usr/bin/smbldap-useradd -w -d /dev/null -g machines -c 'Machine
Account' -s /bin/false $1 >> output.txt

...but Samba never runs it

Contents of ouput.txt before domain join attempt:
Fri Jan 9 13:06:57 PST 2004
after:
Fri Jan 9 13:06:57 PST 2004

~From /var/log/messages:
Jan  9 13:11:31 testbox smbd[2482]:   LDAP search
"(&(uid=kaliklak_)(objectclass=sambaAccount))" returned 0 entries.
Jan  9 13:11:31 testbox smbd[2482]: [2004/01/09 13:11:31, 0]
rpc_server/srv_samr_nt.c:_api_samr_create_user(1929)
Jan  9 13:11:31 testbox smbd[2482]:   User kaliklak$ does not exist in
system password file (usually /etc/passwd). Cannot add account without
a valid local system user.

I'm running out of ideas here.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3-nr1 (Windows XP)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iD8DBQE//xsX57L0B7uXm9oRAgsoAJ9NGCi7tpBtFNJzZqQ9xp6jDCbA3gCfS237
JnmQFXtt7ECSAfI9Br+Fq7c=
=FqPv
-----END PGP SIGNATURE-----