LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 05-02-2011, 06:24 AM   #1
wilslm
LQ Newbie
 
Registered: Apr 2011
Posts: 17

Rep: Reputation: 0
ldapclient certificate path?


Hi there,

I noticed in Solaris they do accept certificate path, but the question I have where I can point the Root CA file? Assuming that my certificate file is abc.cert.

Under Redhat (PAM_LDAP), the ldap.conf has the option of -CACERTFile <filename> where I can point to a specific cert.


http://www.s-gms.ms.edus.si/cgi-bin/...?ldapclient+1M
 
Old 05-03-2011, 01:22 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

You'll have to set up the keystore in /var/ldap - here's what I do:
Code:
# rm -f /var/ldap/*.db
# /usr/sfw/bin/certutil -N -d /var/ldap        # (No password - just hit return twice)
# chmod 444 /var/ldap/*.db
# /usr/sfw/bin/certutil -A -n "ca-cert" -i /path/to/CA.pem -a -t CT -d /var/ldap
Dave
 
Old 05-03-2011, 01:29 AM   #3
wilslm
LQ Newbie
 
Registered: Apr 2011
Posts: 17

Original Poster
Rep: Reputation: 0
Dave,

Thanks for the reply. I have been playing around with this ldapclient but with no luck. On /var/adm/messages
libsldap: make connection: failed to open connection. I turn on wireshark on the ldapserver, found out that the ldapclient sent an alert saying "bad certificate".
My question is Does libsldap normally get the certificate from /var/ldap/cert8.db?

I managed to get it working if I run query manually via ldapsearch and pointed to /var/ldap/cert8.db

Thanks,
 
Old 05-03-2011, 01:36 AM   #4
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

If ldapsearch works, then you're most of the way there.
Are you using fully-qualified hostnames everywhere (including in the LDAP server's certificate)?
If you run 'getent hosts <IP>' for the LDAP server's IP does it return the hostname specified in the SSL cert?

Dave
 
Old 05-03-2011, 01:45 AM   #5
wilslm
LQ Newbie
 
Registered: Apr 2011
Posts: 17

Original Poster
Rep: Reputation: 0
I executed this command and it gave me a result
1) ldapsearch -vvv -h 10.200.19.5 -p 636 -D ldapuser -w passowrd -Z -P /var/ldap/cert8.db -b dc=smns,dc=blue,dc=com,dc=cn -s base objectclass=* nisDomain

----- 1 matches

it gives me a confidence that the cert8.db is the right cert.

2) # getent hosts 10.200.19.5
10.200.19.5 hostname.smns.blue.com.cn smns.blue.com.cn
my certificate is issued to "hostname" issued by "hostname", certificate path "hostname" - does this matter?
 
Old 05-03-2011, 02:07 AM   #6
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
The certificate hostname has to be exactly right, so if the reverse lookup comes back with 'hostname.smns.blue.com.cn' , then the certificate has to be issued to 'hostname.smns.blue.com.cn' - 'hostname' isn't enough.

Dave
 
Old 05-03-2011, 02:30 AM   #7
wilslm
LQ Newbie
 
Registered: Apr 2011
Posts: 17

Original Poster
Rep: Reputation: 0
Dave,

I modified the /etc/hosts so that when I executed
getent hosts 10.200.19.5 it gives me
hostname hostname.domain.name

but it still doesn't work. I was wondering is there any way to get a verbose? message? I've got all of this from Wireshark (3rd party tool) rather than Solaris own logging system
 
Old 05-03-2011, 03:51 AM   #8
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
I haven't found a way of getting any decent logs out of ldapclient.

What is the full ldapclient command you're using?
What does '/usr/sfw/bin/openssl s_client -connect <ldapserver>:636' return?

Dave
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux or GIAC Certificate path jarod_123 Linux - General 1 10-31-2009 11:01 AM
bash script path issue - how to pass a path as a string to a variable PiNPOiNT Programming 5 04-17-2009 05:48 PM
set up java_home path in /home/user/.bashrc but use path in /usr/lib/java vitalstrike82 Slackware 4 01-13-2009 11:25 PM
Building a certificate chain from the certificate using openSSL aravinda78 Linux - Security 1 11-10-2008 01:51 AM
Can I retrieve certificate expiry date from an openssl certificate (command line) davee Linux - Security 1 07-21-2006 10:28 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 01:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration