cat << EOF | ldapadd -x -W -H ldaps://192.168.20.230 -D cn=xiodiadmin,dc=xiodi,dc=cn
dn: cn=admin,ou=group,dc=xiodi,dc=cn
objectClass: posixGroup
cn: admin
gidNumber: 2001
dn: cn=dba,ou=group,dc=xiodi,dc=cn
objectClass: posixGroup
cn: dba
gidNumber: 2002
dn: cn=dev,ou=group,dc=xiodi,dc=cn
objectClass: posixGroup
cn: dev
gidNumber: 2003
EOF
# cat << EOF | ldapadd -x -W -H ldaps://192.168.20.230 -D cn=xiodiadmin,dc=xiodi,dc=cn
dn: uid=admin01,ou=people,dc=xiodi,dc=cn
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetOrgPerson
uid: admin01
cn: 01
sn: admin
userPassword: xiodi.cn
shadowLastChange: 17085
shadowMin: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 1001
gidNumber: 2001
homeDirectory: /home/users/admin01
dn: uid=dba01,ou=people,dc=xiodi,dc=cn
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetOrgPerson
uid: dba01
cn: 01
sn: dba01
userPassword: xiodi.cn
shadowLastChange: 17085
shadowMin: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 1002
gidNumber: 2002
homeDirectory: /home/users/dba01
dn: uid=dev01,ou=people,dc=xiodi,dc=cn
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetOrgPerson
uid: dev01
cn: 01
sn: dev
userPassword: xiodi.cn
shadowLastChange: 17085
shadowMin: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 1003
gidNumber: 2003
homeDirectory: /home/users/dev01
EOF
作者:jackzang 创建时间:2022-10-20 17:58
最后编辑:jackzang 更新时间:2023-01-10 17:43
最后编辑:jackzang 更新时间:2023-01-10 17:43