[Samba] Adding a machine account to Samba PCD + LDAP?
sputhenp at redhat.com
Sat Feb 23 19:33:28 GMT 2008
Kyle Schmitt wrote:
> How does one go about adding a machine account, or even a normal samba
> account, on a Samba PDC with LDAP back end?
> I wanted to avoid using something like smbldap-useradd, because I want
> to actually understand what's going on. I'm assuming it's just some
> sort of small ldif to add, like I would for adding user, am I wrong?
I use the below script to add a machine account in ldap for samba.
nextuid=$(($uid + 1))
echo $nextuid > /etc/samba/machineid
read -p " Please enter the machine name (If your windows system name is
, please only enter dhcp6-120 : " choice
/usr/bin/ldapmodify -a -x -H ldap://<ip> -D
cn=admin,dc=xxxx,dc=xxxxx,dc=com -w redsmb << EOF
cn: $choice Account
After adding the machine account using the above script, I would be able
to join the system to the PDC domain. The joining process would add
additional required attributes and values appropriately while joining.
More information about the samba