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? Thanks, Kyle
"Kyle Schmitt" <kyleaschmitt@gmail.com> wrote in message news:2b548b8b0802221459k3cc87817oe87110c523a8e05c@mail.gmail.com...> 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? > > Thanks, > Kyle > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/listinfo/samba >I use the Windows NT 4.0 tools Window Manager for Domains and Server Manager to manage users and servers on my Samba domain. These GUI tools interface with the smbldap-tools . I set up LDAP and Samba in the normal way. I use the smb-ldap tools to add and remove users and machines. I place the User Manager for Domains utility on a Samba share and access it from a Windows 2000 or XP workstation. I add computers to the domain the same way I add them in Windows. I go to My Computer, choose properties and join the domain. Samba works quite well for us.
Sadique Puthen
2008-Feb-23 19:33 UTC
[Samba] Adding a machine account to Samba PCD + LDAP?
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. #!/bin/bash uid=`cat /etc/samba/machineid` 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 dn: uid=$choice\$,ou=Computers,dc=samba,dc=redhat,dc=com uid: $choice\$ cn: $choice Account objectClass: account objectClass: posixAccount objectClass: top userPassword: {crypt}x loginShell: /sbin/nologin uidNumber: $uid gidNumber: 2515 homeDirectory: /dev/null EOF 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. --Sadique> Thanks, > Kyle >