Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
| Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
| fortgeschrittene:samba-ldap-pdc [2011/04/07 20:57] iw [smbldap-tools] | fortgeschrittene:samba-ldap-pdc [2013/10/16 15:52] (aktuell) | ||
|---|---|---|---|
| Zeile 19: | Zeile 19: | ||
| #LDAP Anbindung: | #LDAP Anbindung: | ||
| passdb backend = ldapsam:ldap://ldap1.villa.local | passdb backend = ldapsam:ldap://ldap1.villa.local | ||
| - | ldap suffix = dc=villa,dc=local | + | ldap suffix  = dc=villa,dc=local | 
| - | ldap admin dn = "cn=admin,dc=villa,dc=local" | + | ldap admin dn = "cn=admin,dc=villa,dc=local" | 
| - | ldap user suffix = ou=people | + | ldap user suffix  = ou=people | 
| - | ldap group suffix = ou=groups | + | ldap group suffix  = ou=groups | 
| ldap machine suffix = ou=computers | ldap machine suffix = ou=computers | ||
| - | ldap idmap suffix = ou=people | + | ldap idmap suffix  = ou=people | 
| ldap ssl = off | ldap ssl = off | ||
| Zeile 67: | Zeile 67: | ||
| </code> | </code> | ||
| <file> | <file> | ||
| - | dn: ou=computers,$DOMAIN | + | TODO muss neu erzerugt werden | 
| - | objectClass: top | + | |
| - | objectClass: organizationalUnit | + | |
| - | ou: computers | + | |
| - | + | ||
| - | dn: cn=workstations,ou=groups,$DOMAIN | + | |
| - | objectClass: top | + | |
| - | objectClass: posixGroup | + | |
| - | gidNumber: 515 | + | |
| - | cn: workstations | + | |
| - | + | ||
| - | dn: cn=domadmins,ou=groups,$DOMAIN | + | |
| - | objectClass: posixGroup | + | |
| - | objectClass: sambaGroupMapping | + | |
| - | gidNumber: 512 | + | |
| - | cn: domadmins | + | |
| - | sambaSID: $SID-512 | + | |
| - | sambaGroupType: 2 | + | |
| - | displayName: Domain Admins | + | |
| - | description: Domain Administrators | + | |
| - | + | ||
| - | dn: cn=domusers,ou=groups,$DOMAIN | + | |
| - | objectClass: posixGroup | + | |
| - | objectClass: sambaGroupMapping | + | |
| - | gidNumber: 513 | + | |
| - | cn: domusers | + | |
| - | sambaSID: $SID-513 | + | |
| - | sambaGroupType: 2 | + | |
| - | displayName: Domain Users | + | |
| - | description: Domain Users | + | |
| - | + | ||
| - | dn: cn=domguests,ou=groups,$DOMAIN | + | |
| - | objectClass: posixGroup | + | |
| - | objectClass: sambaGroupMapping | + | |
| - | gidNumber: 514 | + | |
| - | cn: domguests | + | |
| - | sambaSID: $SID-514 | + | |
| - | sambaGroupType: 2 | + | |
| - | displayName: Domain Guests | + | |
| - | description: Domain Guests Users | + | |
| - | + | ||
| - | dn: uid=smbadmin,ou=people,$DOMAIN | + | |
| - | objectClass: top | + | |
| - | objectClass: posixAccount | + | |
| - | objectClass: account | + | |
| - | cn: Samba Domain Admin | + | |
| - | uid: smbadmin | + | |
| - | uidNumber: 10001 | + | |
| - | gidNumber: 512 | + | |
| - | homeDirectory: /home/smbadmin | + | |
| - | loginShell: /bin/false | + | |
| - | LDIF | + | |
| </file> | </file> | ||
| Zeile 134: | Zeile 83: | ||
| Überprüfen: | Überprüfen: | ||
| net -U smbadmin rpc rights list smbadmin | net -U smbadmin rpc rights list smbadmin | ||
| + |  | ||
| + | Alternativ: | ||
| + | net sam rights grant ntadmin SeMachineAccountPrivilege SeAddUsersPrivilege | ||
| + | |||
| === Rechner hinzufügen === | === Rechner hinzufügen === | ||
| Zeile 153: | Zeile 106: | ||
| loginShell: /bin/false | loginShell: /bin/false | ||
| uid: $MACHINE$ | uid: $MACHINE$ | ||
| + | |||
| LDIF | LDIF | ||
| </file> | </file> | ||
| Zeile 168: | Zeile 122: | ||
| <file> | <file> | ||
| ldap delete dn = Yes | ldap delete dn = Yes | ||
| + | unix password sync = Yes | ||
| passwd program = /usr/sbin/smbldap-passwd %u | passwd program = /usr/sbin/smbldap-passwd %u | ||
| - | passwd chat = *New*password* %n\n *Retype*new*password* %n\n *all*authentication*tokens*updated* | + | |
| add user script = /usr/sbin/smbldap-useradd -m "%u" | add user script = /usr/sbin/smbldap-useradd -m "%u" | ||
| delete user script = /usr/sbin/smbldap-userdel "%u" | delete user script = /usr/sbin/smbldap-userdel "%u" | ||
| - | add machine script = /usr/sbin/smbldap-useradd -w "%u" | + | add machine script = /usr/sbin/smbldap-useradd -t 2 -w "%u" | 
| - | add group script = /usr/sbin/smbldap-groupadd -p "%g" | + | add group script = /usr/sbin/smbldap-groupadd -a "%g" | 
| delete group script = /usr/sbin/smbldap-groupdel "%g" | delete group script = /usr/sbin/smbldap-groupdel "%g" | ||
| add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g" | add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g" | ||
| Zeile 191: | Zeile 146: | ||
| ''/etc/smbldap-tools/smbldap.conf'' : | ''/etc/smbldap-tools/smbldap.conf'' : | ||
| <file> | <file> | ||
| - | SID="S-1-5-21-2320849130-3131792283-2083377348" | + | #SID="S-1-5-21-2320849130-3131792283-2083377348" | 
| + | </file> | ||
| + | <file> | ||
| sambaDomain="kurs" | sambaDomain="kurs" | ||
| + | </file> | ||
| + | <file> | ||
| slaveLDAP="localhost" | slaveLDAP="localhost" | ||
| + | </file> | ||
| + | <file> | ||
| masterLDAP="localhost" | masterLDAP="localhost" | ||
| + | </file> | ||
| + | <file> | ||
| ldapTLS="0" | ldapTLS="0" | ||
| + | </file> | ||
| + | <file> | ||
| suffix="dc=linuxhotel,dc=de" | suffix="dc=linuxhotel,dc=de" | ||
| + | </file> | ||
| + | <file> | ||
| + | usersdn="ou=People,${suffix}" | ||
| + | </file> | ||
| + | <file> | ||
| idmapdn="ou=People,${suffix}" | idmapdn="ou=People,${suffix}" | ||
| + | </file> | ||
| + | <file> | ||
| userSmbHome="" | userSmbHome="" | ||
| + | </file> | ||
| + | <file> | ||
| userProfile="" | userProfile="" | ||
| + | </file> | ||
| + | <file> | ||
| + | userScript="" | ||
| </file> | </file> | ||
| chmod 0644 /etc/smbldap-tools/smbldap.conf | chmod 0644 /etc/smbldap-tools/smbldap.conf | ||
| chmod 0600 /etc/smbldap-tools/smbldap_bind.conf | chmod 0600 /etc/smbldap-tools/smbldap_bind.conf | ||
| - | ./smbldap-populate -a smbadmin | + | smbldap-populate -a smbadmin -e /tmp/samba.ldif | 
| + | ''/tmp/samba.ldif'' prüfen (( Todo: ''smbadmin'' checken: ''uidNumber'' und ''gidNumber'' auf einen anderen Wert als 0 ändern ... )) | ||
| + | ldapadd -x -W -D cn=admin,dc=example,dc=com -f /tmp/samba.ldif -h ldap1.example.com | ||
| + | (( oder direkt | ||
| + | smbldap-populate -a smbadmin | ||
| + | eingeben und nachträglich ''uidNumber'' und ''gidNumber'' auf einen anderen Wert als 0 ändern | ||
| + | )) | ||
| === Doku === | === Doku === | ||
| Zeile 217: | Zeile 201: | ||
| man smb.conf | man smb.conf | ||
| - | Kann aktuell noch nicht mit inetOrgPerson u.ä. umgehen. | + | Ist beschrankt auf ''obejectclass=account'', kann aktuell noch nicht mit inetOrgPerson u.ä. umgehen. | 
| Zeile 233: | Zeile 217: | ||
| </file> | </file> | ||
|  |  | ||
| + | |||
| + | |||
| ====== Dokus & Links ====== | ====== Dokus & Links ====== | ||
| * Howto für SuSE: http://en.opensuse.org/Howto_setup_SUSE_as_SAMBA_PDC_with_OpenLDAP%2C_DYNDNS_and_CLAM | * Howto für SuSE: http://en.opensuse.org/Howto_setup_SUSE_as_SAMBA_PDC_with_OpenLDAP%2C_DYNDNS_and_CLAM | ||
| * Alternatives LDAP Setup : http://wiki.samba.org/index.php/Ldapsam_Editposix | * Alternatives LDAP Setup : http://wiki.samba.org/index.php/Ldapsam_Editposix | ||