==ldap yum -y install openldap-servers@ yum -y install openldap-clients slappasswd -s PASSWORD -h {MD5} vi /etc/openldap/slapd.conf suffix "dc=localhost,dc=localdomain" rootdn "cn=Manager,dc=localhost,dc=localdomain" rootpw {MD5}************************ <- passwd which you command slappswd access to attrs=userPassword by self write by dn="cn=Manager,dc=fedorasrv,dc=com" write by anonymous auth by * none access to * by dn="cn=Manager,dc=fedorasrv,dc=com" write by self write by * read vi /etc/openldap/ldap.conf BASE dc=localhost,dc=localdomain vi /etc/ladp.conf base dc=localhost,dc=localdomain /etc/rc.d/init.d/ldap start vi /usr/share/openldap/migration/migrate_common.ph $DEFAULT_BASE = "dc=localhost,dc=localdomain"; vi base.ldif dn: dc=localhost,dc=localdomain objectClass: dcObject objectclass: organization o: localhost Organization dc: localhost dn: cn=manager, dc=localhost,dc=localdomain objectclass: organizationalRole cn:manager dn: ou=People,dc=localhost,dc=localdomain objectClass: organizationalUnit ou: People dn: ou=Group,dc=localhost,dc=localdomain objectClass: organizationalUnit ou: Group ldapadd -h localhost -x -D "cn=manager,dc=localhost,dc=localdomain" -W -f base.ldif grep ":5[0-9][0-9]" /etc/passwd > passwd /usr/share/openldap/migration/migrate_passwd.pl passwd > passwd.ldif ldapadd -h localhost -x -D "cn=manager,dc=localhost,dc=localdomain" -W -f passwd.ldif grep ":5[0-9][0-9]" /etc/group > group /usr/share/openldap/migration/migrate_group.pl group > group.ldif ldapadd -h localhost -x -D "cn=manager,dc=localhost,dc=localdomain" -W -f group.ldif authconfig-tui Check LDAP,LDAP Authentication LDAP Server setting. - TEST - useradd test passwd PASSWORD grep ^fedora /etc/passwd > passwd /usr/share/openldap/migration/migrate_passwd.pl passwd > passwd.ldif ldapadd -h localhost -x -D "cn=manager,dc=localhost,dc=localdomain" -W -f passwd.ldif grep ^fedora /etc/group > group /usr/share/openldap/migration/migrate_group.pl group > group.ldif ldapadd -h localhost -x -D "cn=manager,dc=localhost,dc=localdomain" -W -f group.ldif userdel test su - test exit ldapdelete -h localhost -x -D 'cn=manager,dc=localhost,dc=localdomain' -W "uid=localhost,ou=people,dc=localhost,dc=localdomain" ldapdelete -h localhost -x -D 'cn=manager,dc=localhost,dc=localdomain' -W "cn=localhost,ou=group,dc=localdomain,dc=localhost" rm -rf /home/test == samba cp /usr/share/doc/samba-*/LDAP/samba.schema /etc/openldap/schema/ vi /etc/openldap/slapd.conf include /etc/openldap/schema/samba.schema /etc/rc.d/init.d/ldap restart vi /etc/samba/smb.conf@ netbios name = WORKGROUP admin users = Administrator security = user passdb backend = ldapsam:ldap://localhost ldap admin dn = cn=Manager,dc=localhost,dc=localdomain ldap suffix = dc=localhost,dc=localdomain ldap user suffix = ou=People ldap group suffix = ou=Group ldap machine suffix = ou=Computers ldap passwd sync = yes smbpasswd -w PASSWORD(ldap server's admin password) mdkir /etc/smbldap-tools/ cp /usr/share/doc/samba-3.0.28/LDAP/smbldap-tools-0.9.2/smbldap.conf /etc//etc/smbldap-tools/ cp /usr/share/doc/samba-3.0.28/LDAP/smbldap-tools-0.9.2/smbldap_bind.conf chmod 644 /etc/smbldap-tools/smbldap.conf chmod 600 /etc/smbldap-tools/smbldap_bind.conf vi smbldap_bind.conf masterDN="cn=manager,dc=localhost,dc=localdomain" masterPw="PASSWD(ldap server's passwd)" vi smbldap.conf # Put your own SID. To obtain this number do: "net getlocalsid". SID="S-1-5-21-2112063548-1827279849-2976283735" sambaDomain="localhost" ldapTLS="0" usersdn="ou=People,${suffix}" /usr/local/sbin/smbldap-populate