LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   openldap setup in slackware (https://www.linuxquestions.org/questions/slackware-14/openldap-setup-in-slackware-423075/)

rkrishna 03-09-2006 03:04 AM

openldap setup in slackware
 
in my department systems are shared using openldap (rh9-server, all the clients are mandriva) how can i set up openldap in slackware
i downloaded the slack pakg from linuxpackages, and installed

do i need to go for pam?

GlowGlow 03-09-2006 03:23 AM

Using PAM should not be necessary. I haven't tinkered with LDAP yet, so I can only give a pointer. If everything is set up correctly, you should be able to use LDAP for authentication by configuring nsswitch via /etc/nsswitch.conf. The lines

Code:

passwd:        files
shadow:        files
group:          files

could be changed to:

Code:

passwd:        files ldap
shadow:        files ldap
group:          files ldap

But please, look this up in the documentation before making any changes. This information is probably incomplete, but maybe it helps pointing in the right direction.

rkrishna 03-09-2006 05:17 AM

that means we need nss_ldap also??
i am googling but they were discussing about slapd, i dont want to setup a server, do i need slapd.conf.?

i want to run ldap in the boot time also so an rc.openldap must be there no?

danieldk 03-09-2006 08:31 AM

Yep, you need nss_ldap, there is no good other way to make libc (and thus login) aware of LDAP for authentication. No need to run an LDAP server. Compiling nss_ldap and configuring ldap.conf should do the trick. openldap-clients is now in Slackware-Current, so you can download the SlackBuild from -current, and recompile it for 10.2 (I don't really know the LinuxPackages openldap package).

rkrishna 03-09-2006 11:30 PM

Quote:

openldap-clients is now in Slackware-Current,
ok i installed that, do i need to install nss ldap also along with the client?

danieldk 03-10-2006 02:41 AM

That's correct.

rkrishna 03-11-2006 12:35 AM

tht means for connecting to ldap server u only need 2 packages ldpclient(got this from slackware)+nss_ldap(from linux pakgs)and

i editted nsswhich.conf as described in first reply

added two entry to /etc/ldap.conf
"host" and "base" only do i need to edit more in this conf file
still now it is not working :(
what else to be added to this conf file??


how do i do authconf(if i have pam), waht about authentication

danieldk 03-11-2006 01:57 AM

It should not be necessary to use PAM. If you use PAM, you will probably need other modules. Did you correctly configure /etc/ldap.conf ? Are there any relevant errors in the system logs? Is a connection to the LDAP server made?

You can check the last question by running

tcpdump -i <ethernet interface>

on one terminal, and trying to log in through LDAP on an other terminal.

rkrishna 03-12-2006 04:13 AM

danieldk
Quote:

you correctly configure /etc/ldap.conf ?
how do we know, i am new to this :(
Quote:

Are there any relevant errors in the system logs?
means??
tcpdump -i eth0 --is this correct??
and trying to log in through LDAP--how??

also i made rc.openldap executable but it is not showing while system boots

rkrishna 03-14-2006 11:25 PM

someone help me, someone familiar with LDAP
please answer the questions from the previous post #9
(or else i wil read the help and manuals)
where is danieldk

myboysherman 03-17-2006 03:49 AM

"not showing during boot"

There is probably nothing to call it. You need to either start it manually i.e. "/etc/rc.d/rc.openldap start" or add that line to the end of rc.local (making sure that rc.local is executable.)

Most of the other rc.scripts get called from rc.M or another script but custom ones usually need to be added.

Alien Bob 03-17-2006 04:16 AM

Quote:

also i made rc.openldap executable but it is not showing while system boots
If you want to authenticate against a LDAP server somewhere on your network, you do not need to run your own local LDAP server. So, there is no reason to run rc.openldap at boot.

TIP
When you put a "rc" script in /etc/rc.d and make it executable, that does not mean that the script will be automatically started by Slackware when your computer boots. You will need to add something like the following lines to /etc/rc.d/rc.local (I am taking your rc.openldap script as an example):
Code:

if [ -x /etc/rc.d/rc.openldap ]; then
  echo "Starting LDAP server:    /etc/rc.d/rc.oipenldap start"
  /etc/rc.d/rc.openldap start
fi

That way, your script will run when Slackware boots (and it will show on the console). Disabling the script is as easy as "chmod -x rc.openldap"; you can leave the lines in rc.local intact.

Eric

rkrishna 03-17-2006 06:06 AM

thanks "Alien Bob" tht was a nice tip ;)
Quote:

f you want to authenticate against a LDAP server somewhere on your network, you do not need to run your own local LDAP server.
then how will i connect to an ldap server? i want authentication(there in other machines authconf will work)

rkrishna 03-17-2006 06:30 AM

when i rebooted the machine i got this message
Code:

Starting LDAP server:    /etc/rc.d/rc.openldap start
/etc/rc.d/rc.openldap: line 8: /usr/libexec/slapd: No such file or directory

i have installed "openldap-client-2.3.17-i486-1" downloaded from slack current "nss_ldap-244-i486-1wsa" from linuxpackages.

Alien Bob 03-17-2006 07:58 AM

Quote:

when i rebooted the machine i got this message

Starting LDAP server: /etc/rc.d/rc.openldap start /etc/rc.d/rc.openldap: line 8: /usr/libexec/slapd: No such file or directory

i have installed "openldap-client-2.3.17-i486-1" downloaded from slack current
Now what did I tell you just before... you do not need to run rc.openldap because you only need the client functionality. The openldap-client package does not contain the slapd program (the server component).
About LDAP authentication in Slackware without using PAM: I know that this will not work with all LDAP servers. Try looking for more help, for instance on the alt.os.linux.slackware neewsgroup. I know of several regular posters there who have LDAP authentication on Slackware working.
If you can not get it to work at all, you might want to consider installing Dropline Gnome on your computer. Dropline will install PAM on your computer as well as Gnome.

Eric


All times are GMT -5. The time now is 05:40 PM.