[Samba] add user script

Jim C jcllings at tsunamicomm.net
Tue Aug 19 02:41:03 GMT 2003


Mark wrote:

>Hi all-
>
> 
>
>OK, I've been pulling my hair out for a while on this.
>
> 
>
>I've got a server running RH9 and Samba-3.0.0RC1 (installed via rpm) set
>up as a PDC.
>
> 
>
>There seems to be a problem setting up machine accounts on the fly.
>I've got the basic:
>
> 
>
>add user script = /usr/sbin/useradd -d /dev/null -g 100 -s /bin/false -M
>%u
>
> 
>
>in my smb.conf but every time I try to join a computer to the domain, I
>get the error:
>
> 
>
>The following error occurred attempting to join the domain "<domain>":
>
>The user name could not be found.
>
This could have to do with where you are storeing the machine accounts. 
I chose to store them under thier own ou called Machines. In order to do 
this however I had to make the following change in /etc/ldap.conf  Note 
that the first line is ?sub rather than ?one.

...
nss_base_passwd         dc=example,dc=com?sub
#nss_base_passwd         ou=People,dc=example,dc=com?one
nss_base_shadow         ou=People,dc=example,dc=com?one
nss_base_group          ou=Group,dc=example,dc=com?one
nss_base_hosts          ou=Hosts,dc=example,dc=com?one
#nss_base_services      ou=Services,dc=example,dc=com?one
#nss_base_networks      ou=Networks,dc=example,dc=com?one
#nss_base_protocols     ou=Protocols,dc=example,dc=com?one
#nss_base_rpc           ou=Rpc,dc=example,dc=com?one
#nss_base_ethers        ou=Ethers,dc=example,dc=com?one
#nss_base_netmasks      ou=Networks,dc=example,dc=com?ne
#nss_base_bootparams    ou=Ethers,dc=example,dc=com?one
#nss_base_aliases       ou=Aliases,dc=example,dc=com?one
#nss_base_netgroup      ou=Netgroup,dc=example,dc=com?one
...

>
>All the logs show that everything is fine with the authentication, and I
>know that if I add the machine account manually, I've got no problem
>joining the domain.  With 50-100 computers, manually adding the machine
>accounts is not really a viable option.  Has anyone else experienced
>this problem?
>
> 
>
>Thanks for your input,
>
> 
>
>Mark
>
>  
>






More information about the samba mailing list