LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
LinkBack Search this Thread
Old 01-26-2012, 03:30 PM   #1
watcher69b
Member
 
Registered: Nov 2007
Location: /home/watcher69b
Distribution: RH, Fedora & CentOS
Posts: 539

Rep: Reputation: 39
Setting up Fedora to use LDAPS [Script]


echo This script will [hopefully] update Fedora 16+ to use LDAPS
echo written by Jon S. and Nate G. @ JMU.edu
echo A.Y.B.A.B.U.

# First install LDAP PAM Modules missing from basic install
yum install pam_krb5 nss-pam-ldapd -y

# Enable LDAP authentication
/usr/sbin/authconfig --kickstart --enableldapauth --ldapserver ldap.redhat.com --ldapbasedn dc=ldap,dc=redhat,dc=com --update

#edit the /etc/pam_ldap.conf file
cat >>/etc/pam_ldap.conf <<EOF
base dc=ldap,dc=redhat,dc=com
port 636
nss_initgroups_ignoreusers root,ldap,named,avahi,haldaemon,dbus,radvd,tomcat,radiusd,news,mailman,nscd,gdm
ssl on
uri ldaps://ldap.redhat.com:636
tls_cacertdir /etc/openldap/cacerts
pam_password md5
binddn USERNAME@redhat.com
bindpw BIGPASSWORD
pam_login_attribute cn
EOF

#edit the /etc/openldap/ldap.conf file
cat >>/etc/openldap/ldap.conf <<EOF
URI ldaps://ldap.redhat.com:636
BASE dc=ldap,dc=redhat,dc=com
TLS_REQCERT demand
TLS_CACERTDIR /etc/openldap/cacerts
EOF

cd /etc/pam.d
/bin/cp system-auth /root/system-auth.orig
/bin/sed -e 's/account.*\[default/#account \[default/' system-auth > system-auth.1
/bin/mv -f system-auth.1 system-auth


cd /etc/openldap/cacerts
ln -s /etc/pki/tls/certs/ca-bundle.crt ca-bundle.pem

echo Restart your system and make sure it worked.
echo

Last edited by watcher69b; 02-22-2012 at 01:44 PM.
 
Old 01-26-2012, 04:15 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 39,821

Rep: Reputation: 1116Reputation: 1116Reputation: 1116Reputation: 1116Reputation: 1116Reputation: 1116Reputation: 1116Reputation: 1116Reputation: 1116
I'd suggest that a questions forum is not a great place to just place scripts like that, you might like to think about your own blog or something.

And why would you be telling people to reboot at the end of it??
 
Old 01-27-2012, 05:32 AM   #3
watcher69b
Member
 
Registered: Nov 2007
Location: /home/watcher69b
Distribution: RH, Fedora & CentOS
Posts: 539

Original Poster
Rep: Reputation: 39
See all the Microsoft certs? That's why I reboot
 
  


Reply

Tags
ldap ldaps fedora16 f16


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
phpldapadmin can't talk ldaps chakkerz Linux - Server 1 04-22-2010 08:26 PM
Error in ldaps configuration amit_kalipur Linux - Server 2 05-11-2009 05:02 AM
configuring ldaps in alpine timvc Linux - Software 2 09-11-2008 03:28 AM
authentication with ldaps rimvydazas Linux - Security 1 08-03-2007 01:36 PM
LDAPS client cannot connect lnthai2002 Linux - Networking 0 09-14-2006 11:01 PM


All times are GMT -5. The time now is 03:31 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration