-
Notifications
You must be signed in to change notification settings - Fork 979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to create users in command line? #227
Comments
first off you need to get into the container PS: you probably need to lay your user DN like so "uid,ou,dc,dc" especially if you are using ldap for user login and authentication |
Hi, I did the command below but didn't get prompt for admin password. |
Hey @lhty24 @BertrandGouny ! We here create following these steps: Example: mkdir my-folder
cd my-folder
cat >> user.ldif <<EOL
dn: uid=admin,dc=example,dc=org
uid: admin
cn: admin
sn: 3
objectClass: top
objectClass: posixAccount
objectClass: inetOrgPerson
loginShell: /bin/bash
homeDirectory: /home/admin
uidNumber: 14583102
gidNumber: 14564100
userPassword: admin
mail: [email protected]
gecos: admin
EOL
docker container run --name my_ldap_server -v $(pwd):/container/service/slapd/assets/test -p 3089:389 -d osixia/openldap
docker container exec my_ldap_server ldapadd -D "cn=admin,dc=example,dc=org" -w admin -f /container/service/slapd/assets/test/user.ldif |
I will close the issue because for me it was resolved. But let me know @lhty24 if your doubt was satisfied. If not, we can reopen the issue later 👍 🤝 |
How do I create an LDAP user, in command line, with
docker
command?The text was updated successfully, but these errors were encountered: