Home > OS >  Some problems about the openldap installation
Some problems about the openldap installation

Time:09-30

https://www.cnblogs.com/rusking/p/8099124.html
This link is the openldap configuration on the server, I'm here to see the later want to ask a few questions:
1: this is through the openldap server to store the user and password information, first of all, in the second step, configure the LDAP server local domain here, this time I want to ask next to introduce cosine. Ldif and nis ldif what are the two files? Where I can view to specify the two files?
2: in step 2.3 create/etc/openldap/base. The ldif file and copy the following information in
[root @ server0 schema] # vi/etc/openldap/base. The ldif
Dn: dc ultrapower, dc=com
Dc: ultrapower
ObjectClass: top
ObjectClass: domain

Dn: ou=People, dc ultrapower, dc=com
Ou: People
ObjectClass: top
ObjectClass: organizationalUnit

Dn: ou=Group, dc ultrapower, dc=com
Ou: Group
ObjectClass: top
ObjectClass: organizationalUnit
Behind and then create the directory structure of the service, and then the normal/etc/passwd/etc/group file into a ldif file

/root @ server0 ~ # CD/usr/share/migrationtools/

3.3.1 converts the user information into ldif file and imported into the LDAP
[root @ server0 migrationtools] # grep ": 10 [0-9] [0-9]"/etc/passwd & gt; Passwdtest
[root @ server0 migrationtools] # cat passwdtest
Rusky: x: 1000-1000: rusky:/home/rusky:/bin/bash
Testldapuser1: x: : 1001-1001:/home/guests/testldapuser1:/bin/bash
Testldapuser2: x: : 1002-1002:/home/guests/testldapuser2:/bin/bash
Testldapuser3: x: : 1003-1003:/home/guests/testldapuser3:/bin/bash
Testldapuser4: x: : 1004-1004:/home/guests/testldapuser4:/bin/bash
Testldapuser5: x: : 1005-1005:/home/guests/testldapuser5:/bin/bash
Testldapuser6: x: : 1006-1006:/home/guests/testldapuser6:/bin/bash
Testldapuser7: x: : 1007-1007:/home/guests/testldapuser7:/bin/bash
Testldapuser8: x: : 1008-1008:/home/guests/testldapuser8:/bin/bash
Testldapuser9: x: : 1009-1009:/home/guests/testldapuser9:/bin/bash
Testldapuser10: x: : 1010-1010:/home/guests/testldapuser10:/bin/bash

[root @ server0 migrationtools] #./migrate_passwd pl passwdtest users. The ldif - executes the command to convert the passwd file created in step can identify the LDAP ldif format files,
This time the cat users. The ldif file shows as follows:
[root @ server0 migrationtools] # cat. User ldif
Dn: uid=rusky, ou=People, dc ultrapower, dc=com
Uid: rusky
Cn: rusky
ObjectClass: account
ObjectClass: posixAccount
ObjectClass: top
ObjectClass: shadowAccount
UserPassword: {crypt} $6 $1 $sd5ht puce65tsly517vy PGvqQnLO8Rb3AyEswE1ZWX6QAYxo3q6PPkJ5mq0i0NZuy352GFwnUgLxiySdszCr7v5qebg50gVVOYQ.
ShadowMin: 0
ShadowMax: 99999
ShadowWarning: 7
LoginShell:/bin/bash
UidNumber: 1000
GidNumber: 1000
HomeDirectory:/home/rusky
Gecos: rusky

I would like to ask, he is the matching relation between how can anyone know of, for example, how does he know the uid is rusky, uidNumber is 1000, not seven or 9999
If I want to add other data is not a user name and password, for example, I want to add the data is the id number, name, gender, age, and how to add? Please know that tell the thank you


CodePudding user response:

Cosine. Ldif and nis. Ldif these two files, you can baidu seemed to import the basic table structure

Reference
I would like to ask, the matching relation between what he knew, for example, how does he know the uid is rusky, uidNumber is 1000, not seven or 9999

Rusky is the user name, uid, 1000 is when your account was created in the/etc/passwd file will be generated inside the
Reference
3.3.1 converts the user information into the ldif file, and imported into LDAP

This cloth is not have this information? Rusky: x: 1000-1000: rusky:/home/rusky:/bin/bash
/etc/passwd format: user name: password: UID, GID: description: the home directory: login shell

CodePudding user response:

reference 1st floor zhouchao6 response:
cosine. Ldif and nis ldif these two files, you can baidu seemed to import the basic table structure

Reference
I would like to ask, the matching relation between what he knew, for example, how does he know the uid is rusky, uidNumber is 1000, not seven or 9999

Rusky is the user name, uid, 1000 is when your account was created in the/etc/passwd file will be generated inside the
Quote:
3.3.1 converts the user information into the ldif file, and imported into LDAP

This cloth is not have this information? Rusky: x: 1000-1000: rusky:/home/rusky:/bin/bash
/etc/passwd format: user name: password: UID, GID: description: the home directory: login shell

Thank you for your reply, I know in the Linux/etc/passwd and/etc/group in each field has a format, I mean, if I defined a file, the file such as id, name, gender, age, such format, so I import ldif file, how did he know that I the meaning of each field
  • Related