[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: newbie: I cannot get admin password to work



> I am in a right pickle, I install slapd and answered the questions
> correctly giving it a password.
>
> I added a new entry which it complained about but still added!! Stupid
> why add if it complains, either add or not!! sorry

Do you have an example of what you're talking about here?  Maybe you
could be more specific about what you installed, what commands you
ran, and the output you find so offensive.

>
> Anyway want to delete entry jdw becuase I made the silly mistake of
> assuming People would be ok, but no, it has to be people.
>
>
> ldapsearch -x -b 'dc=shadshed,dc=com' '(objectclass=*)'
> # extended LDIF
> #
> # LDAPv3
> # base <dc=shadshed,dc=com> with scope sub
> # filter: (objectclass=*)
> # requesting: ALL
> #
>
> # shadshed.com
> dn: dc=shadshed,dc=com
> objectClass: top
> objectClass: dcObject
> objectClass: organization
> o: Shadow Robot Company
> dc: shadshed
>
> # admin, shadshed.com
> dn: cn=admin,dc=shadshed,dc=com
> objectClass: simpleSecurityObject
> objectClass: organizationalRole
> cn: admin
> description: LDAP administrator
>
> # jdw, People, shadshed.com
> dn: uid=jdw,ou=People,dc=shadshed,dc=com
> uid: jdw
> cn: Delete Me
> objectClass: account
> objectClass: posixAccount
> objectClass: top
> objectClass: shadowAccount
> shadowLastChange: 13193
> shadowMax: 99999
> shadowWarning: 7
> loginShell: /bin/bash
> uidNumber: 1010
> gidNumber: 1010
> homeDirectory: /home/jdw
> gecos: worsdall,,,,,,
>
> # search result
> search: 2
> result: 0 Success
>
> # numResponses: 4
> # numEntries: 3
>
>
> So how do I delete it, I am using the password I supplied during
> installation??
>
>
>
> sudo ldapdelete -x -w tooC2thugh -D cn=admin,dc=shadshed,dc=com "cn=Mark
> Worsdall,dc=shadshed,dc=com"
>

There is no need to 'sudo'.  ldap doesn't care about your local account.

> It returned:
>
> ldap_bind: Invalid credentials (49)
>
>
> And since I have posted the password how do I change the admin password?
>

There is no need to change it.  Error 49 lets us know that you're
using the wrong one.
You can change it by modifying modifying your config files.  Look for
rootdn/rootpw.

>
> Oh this is the entry I wish to add:
>
> dn: uid=jdw,ou=people,dc=shadshed,dc=com
> uid: jdw
> cn: Delete Me
> objectClass: account
> objectClass: posixAccount
> objectClass: top
> objectClass: shadowAccount
> userPassword: {crypt}$1$xvpUzOKX$6ZORWdD9QksB2X0sDmGHk/
> shadowLastChange: 13193
> shadowMax: 99999
> shadowWarning: 7
> loginShell: /bin/bash
> uidNumber: 1010
> gidNumber: 1010
> homeDirectory: /home/jdw
>
>
> Will do it with this?
>  offline method:
> sudo slapadd -v < ~/addjdw.ldif
>

I wouldn't recommend this.

>  online method
> sudo ldapadd -x -v -D cn=admin,dc=shadshed,dc=com -W < ~/addjdw.ldif
>

This looks better.  I tend to use -f instead of <.

>
> Can anyone help, I have never run into such a complicated package, pity
> there is no ssh terminal menu driven package for adding and deleting and
> listing entries.

Maybe you'd like ldapsh.
http://www.ypass.net/software/applications/ldapsh/

>
> Grateful for any help.
> --
> Mark Worsdall
>