[Samba] Can't add machine account with 3.0.0;
ldapsam backend (RESENT)
jean-marc pouchoulon
jean-marc.pouchoulon at ac-montpellier.fr
Tue Oct 14 09:40:37 GMT 2003
># pdbedit -v -a -m -u tardis
>ldapsam_modify_entry: Failed to add user dn=
uid=tardis$,ou=Machines,dc=amazing-internet,dc=net with: Object class
>violation
> object class 'sambaSamAccount' requires attribute 'sambaSID'
Did you create the machine account in /etc/passwd or in ldap
before using pdbedit ?
Extract from a python script I've done what am I doing in the ldap
before pdbedit -a -m.
def cre_ldif_machine(last_uidnumber):
""" Cette fonction crée un fichier d'enregistrement ldap d'un
compte machine pour samba"
""
sys.stdout = open('/etc/samba/bin/machine.ldif', 'w')
print "dn: uid=%s,ou=pc,o=test,c=fr" % sys.argv[1]
print "objectclass: account"
print "objectclass: posixaccount"
print "objectclass: shadowaccount"
print "uid:%s" % sys.argv[1]
print "cn: Samba machine %s " % sys.argv[1]
print "uidnumber: %s" %last_uidnumber
print "gidnumber:504"
print "homedirectory:/dev/null"
print "loginshell:/bin/false"
sys.stdout.close()
Are you sure to have the right object class and attribute ?
Jean-Marc
More information about the samba
mailing list