Difference between revisions of "SUNScholar/Researcher Authorisation/Step 1"

From Libopedia
Jump to navigation Jump to search
(Created page with "<center> ''' BACK TO RESEARCHER AUTHORISATION''' </center>")
 
m
Line 2: Line 2:
 
  '''[[SUNScholar/Researcher Authorisation| BACK TO RESEARCHER AUTHORISATION]]'''
 
  '''[[SUNScholar/Researcher Authorisation| BACK TO RESEARCHER AUTHORISATION]]'''
 
</center>
 
</center>
 +
Login to the server:
 +
http://wiki.lib.sun.ac.za/index.php/SUNScholar/Prepare_Ubuntu/S01
 +
To check LDAP works, first install the following:
 +
sudo apt-get install ldap-utils ldap-auth-config
 +
Fill in all the details requested during installation
 +
 +
Go to the following folder:
 +
sudo  cd /etc/ldap
 +
Copy the original ldap.conf:
 +
sudo  cp ldap.conf ldap.conf-orig
 +
Delete the original:
 +
sudo  rm ldap.conf
 +
Create a link to the master ldap.conf
 +
sudo  ln -s ../ldap.conf
 +
===Examples===
 +
Example listing of ldap files.
 +
<pre>
 +
root@ir1:/etc/ldap# ls -l
 +
total 8
 +
lrwxrwxrwx 1 root root  12 2010-09-17 20:13 ldap.conf -> ../ldap.conf
 +
-rw-r--r-- 1 root root 245 2011-12-19 18:19 ldap.conf.dpkg-new
 +
-rw-r--r-- 1 root root 245 2010-09-17 20:12 ldap.conf-orig
 +
</pre>
 +
Example ldap.conf file.
 +
<pre>
 +
###DEBCONF###
 +
##
 +
## Configuration of this file will be managed by debconf as long as the
 +
## first line of the file says '###DEBCONF###'
 +
##
 +
## You should use dpkg-reconfigure to configure this file via debconf
 +
##
 +
 +
#
 +
# @(#)$Id: ldap.conf,v 1.38 2006/05/15 08:13:31 lukeh Exp $
 +
#
 +
# This is the configuration file for the LDAP nameservice
 +
# switch library and the LDAP PAM module.
 +
#
 +
# PADL Software
 +
# http://www.padl.com
 +
#
 +
 +
# Your LDAP server. Must be resolvable without using LDAP.
 +
# Multiple hosts may be specified, each separated by a
 +
# space. How long nss_ldap takes to failover depends on
 +
# whether your LDAP client library supports configurable
 +
# network or connect timeouts (see bind_timelimit).
 +
host stbldap01.sun.ac.za stbldap02.sun.ac.za
 +
 +
# The distinguished name of the search base.
 +
base ou=USERS,o=SU
 +
 +
# Another way to specify your LDAP server is to provide an
 +
# uri with the server name. This allows to use
 +
# Unix Domain Sockets to connect to a local LDAP Server.
 +
#uri ldap://127.0.0.1/
 +
#uri ldaps://127.0.0.1/ 
 +
#uri ldapi://%2fvar%2frun%2fldapi_sock/
 +
# Note: %2f encodes the '/' used as directory separator
 +
 +
# The LDAP version to use (defaults to 3
 +
# if supported by client library)
 +
ldap_version 3
 +
 +
# The distinguished name to bind to the server with.
 +
# Optional: default is to bind anonymously.
 +
#binddn cn=proxyuser,dc=padl,dc=com
 +
 +
# The credentials to bind with.
 +
# Optional: default is no credential.
 +
#bindpw secret
 +
 +
# The distinguished name to bind to the server with
 +
# if the effective user ID is root. Password is
 +
# stored in /etc/ldap.secret (mode 600)
 +
#rootbinddn cn=manager,dc=padl,dc=com
 +
 +
# The port.
 +
# Optional: default is 389.
 +
port 636
 +
</pre>
 +
===Conduct LDAP search===
 +
Now run a search on the LDAP server:
 +
sudo ldapsearch -x cn=hgibson
 +
Use whatever filters and attributes that are needed for your campus LDAP server. If the search is successful then you may continue to setup DSpace below.

Revision as of 13:42, 6 June 2015

 BACK TO RESEARCHER AUTHORISATION

Login to the server:

http://wiki.lib.sun.ac.za/index.php/SUNScholar/Prepare_Ubuntu/S01

To check LDAP works, first install the following:

sudo apt-get install ldap-utils ldap-auth-config

Fill in all the details requested during installation

Go to the following folder:

sudo  cd /etc/ldap

Copy the original ldap.conf:

sudo  cp ldap.conf ldap.conf-orig

Delete the original:

sudo  rm ldap.conf

Create a link to the master ldap.conf

sudo  ln -s ../ldap.conf

Examples

Example listing of ldap files.

root@ir1:/etc/ldap# ls -l
total 8
lrwxrwxrwx 1 root root  12 2010-09-17 20:13 ldap.conf -> ../ldap.conf
-rw-r--r-- 1 root root 245 2011-12-19 18:19 ldap.conf.dpkg-new
-rw-r--r-- 1 root root 245 2010-09-17 20:12 ldap.conf-orig

Example ldap.conf file.

###DEBCONF###
##
## Configuration of this file will be managed by debconf as long as the
## first line of the file says '###DEBCONF###'
##
## You should use dpkg-reconfigure to configure this file via debconf
##

#
# @(#)$Id: ldap.conf,v 1.38 2006/05/15 08:13:31 lukeh Exp $
#
# This is the configuration file for the LDAP nameservice
# switch library and the LDAP PAM module.
#
# PADL Software
# http://www.padl.com
#

# Your LDAP server. Must be resolvable without using LDAP.
# Multiple hosts may be specified, each separated by a 
# space. How long nss_ldap takes to failover depends on
# whether your LDAP client library supports configurable
# network or connect timeouts (see bind_timelimit).
host stbldap01.sun.ac.za stbldap02.sun.ac.za

# The distinguished name of the search base.
base ou=USERS,o=SU

# Another way to specify your LDAP server is to provide an
# uri with the server name. This allows to use
# Unix Domain Sockets to connect to a local LDAP Server.
#uri ldap://127.0.0.1/
#uri ldaps://127.0.0.1/   
#uri ldapi://%2fvar%2frun%2fldapi_sock/
# Note: %2f encodes the '/' used as directory separator

# The LDAP version to use (defaults to 3
# if supported by client library)
ldap_version 3

# The distinguished name to bind to the server with.
# Optional: default is to bind anonymously.
#binddn cn=proxyuser,dc=padl,dc=com

# The credentials to bind with. 
# Optional: default is no credential.
#bindpw secret

# The distinguished name to bind to the server with
# if the effective user ID is root. Password is
# stored in /etc/ldap.secret (mode 600)
#rootbinddn cn=manager,dc=padl,dc=com

# The port.
# Optional: default is 389.
port 636

Conduct LDAP search

Now run a search on the LDAP server:

sudo ldapsearch -x cn=hgibson

Use whatever filters and attributes that are needed for your campus LDAP server. If the search is successful then you may continue to setup DSpace below.