LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-18-2023, 08:05 AM   #1
dima_ikar
LQ Newbie
 
Registered: Aug 2021
Posts: 10

Rep: Reputation: Disabled
Unhappy the RADIUS server must use the LDAP protocol to connect to Active Directory


Hi all
I have a task

the RADIUS server must use the LDAP protocol to connect to Active Directory

on Debian, I configured Radius and it connects to Active Directory via ntlm_auth
But you need to configure through the LDAP protocol
Help
 
Old 04-18-2023, 08:54 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,160

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
I believe FreeRadius works with OpenLDAP.
 
Old 04-18-2023, 08:59 AM   #3
dima_ikar
LQ Newbie
 
Registered: Aug 2021
Posts: 10

Original Poster
Rep: Reputation: Disabled
OpenLDAP is a server
and LDAP itself is a protocol through which you can contact AD
 
Old 04-18-2023, 11:54 AM   #4
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
There are 2 ways to do this. One is to put the ldap config into radius, an example:

https://www.golinuxcloud.com/freerad...ADIUS_for_LDAP

The other way is to define the auth module to use PAM and a service name, like MYRADIUS. Add the service name to /etc/pamd.d, then use
the pam_ldap modules for authentication for that service. Since you are managing things that aren't in Linux, the
config would be pretty stripped down, like

Code:
In /etc/pamd.d/MYRADIUS

auth    required                        pam_ldap.so
Of course, the work is to configure the ldap params.

I prefer to do it the pam way because I find radius configuration to be pretty esoteric and I can debug pam easier. If you are using the radius server for other things and you are good with radius, then I'd do the integrated way.
 
Old 04-18-2023, 12:26 PM   #5
dima_ikar
LQ Newbie
 
Registered: Aug 2021
Posts: 10

Original Poster
Rep: Reputation: Disabled
1 way I know it is that you have an LDAP server and you get credentials from there
and I have to take data from AD through the LDAP protocol
 
Old 04-18-2023, 12:27 PM   #6
dima_ikar
LQ Newbie
 
Registered: Aug 2021
Posts: 10

Original Poster
Rep: Reputation: Disabled
Unhappy

[QUOTE=elgrandeperro;6425465]There are 2 ways to do this. One is to put the ldap config into radius, an example:

https://www.golinuxcloud.com/freerad...ADIUS_for_LDAP

1 way I know it is that you have an LDAP server and you get credentials from there
and I have to take data from AD through the LDAP protocol
 
Old 04-18-2023, 02:27 PM   #7
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Devuan, Freebsd
Posts: 580

Rep: Reputation: Disabled
Or IDM gurus have been doing this for years at work.
Few years back they had to implement ldaps as plain ldap is considered a security risk
https://learn.microsoft.com/en-us/tr...tion-authority
 
Old 04-18-2023, 09:46 PM   #8
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
ldap/ldaps, not much difference in the config except you need to use a different port and a cert.

There is a samba way to do this (join the domain) but this is not required. AD essentially IS a ldap server, you just
have to follow its rules. Here is a link that uses pam_ldap, a 'search' account. I don't think you need nclsd for caching.

https://www.virtono.com/community/tu...-under-debian/

Once again, your config (pam) is not to login but to provide the service to radius. The linux server itself DOES NOT use it for
anything except for the pam file for the radius server. All you need is authenticate. You don't use common-auth.

The you configure radius to use pam and the service name. You enable pam and use the pam_auth directive to use the pam module file in /etc/pam.d/MYRADIUS (or whatever service name you choose). That file would have only authenticate for pam_ldap, which of course is configured for AD. It is probably simply:

Code:
auth required pam_ldap.so

I've done this several times, with several services like OAUTH, Yubikey, Safeword, LDAP, where radius is using pam and calling the pam module of the service. Then the radius servers serves the clients (like linux boxes) using pam_radius, which is even easier to use or networking boxes that talk radius, or wifi controllers. Its a little more complicated when you have multiple ways to auth, like AD and if that fails use Yubikey. But the pam modules have ways to pass the "password" down through the stack to the next auth method (there must be a way to do this in radius, because you can define multiple auth methods).

The reason this works is that how to do AD to pam is well understood, and radius to PAM/auth is well understood so it just puts the two together to get a solution, AD to radius.

Last edited by elgrandeperro; 04-18-2023 at 09:50 PM.
 
Old 04-19-2023, 03:51 AM   #9
dima_ikar
LQ Newbie
 
Registered: Aug 2021
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thanks for the answer
my task
To fasten to LDAP RADIUS and through ntlm_auth to do password check.
RADIUS must respond to the EAP-PEAP standard with a tls tunnel, on self-signed certificates.
 
Old 04-19-2023, 03:52 AM   #10
dima_ikar
LQ Newbie
 
Registered: Aug 2021
Posts: 10

Original Poster
Rep: Reputation: Disabled
https://www.virtono.com/community/tu...-under-debian/

interesting article
 
Old 04-20-2023, 11:35 AM   #11
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
The first part, if you use pam auth in radius, you can call either ntlm or ldap auth, it just matters what you have in your pam file.

The second, I've done EAP/TLS return but sure it is similar in freeradius.
 
Old 04-21-2023, 04:30 AM   #12
dima_ikar
LQ Newbie
 
Registered: Aug 2021
Posts: 10

Original Poster
Rep: Reputation: Disabled
I do a check on ntlm_auth - it works
but I don't understand how to do LDAP authorization
who can describe the process
 
Old 04-21-2023, 08:09 AM   #13
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
Authorization or Authentication? These are 2 distinct things, I was talking authentication. I don't know a mapping between AD and linux for authorization, it might exist but I never done it.

Last edited by elgrandeperro; 04-21-2023 at 08:14 AM.
 
Old 05-02-2023, 04:10 AM   #14
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,167

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
check out links below might help or give you some idea:

https://www.golinuxcloud.com/integra...ive-directory/

https://wiki.freeradius.org/guide/fr...egration-howto

Goodluck!
 
Old 05-02-2023, 09:22 AM   #15
dima_ikar
LQ Newbie
 
Registered: Aug 2021
Posts: 10

Original Poster
Rep: Reputation: Disabled
who can show examples of the LDAP file in RADIUS for working with AD
 
  


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
[SOLVED] Radius database scheme not populate radius database jb47 Linux - Server 1 06-13-2018 03:56 AM
Linux (AAA)Radius with Active directory Net_Spy Linux - Networking 3 09-21-2016 01:52 AM
Configure Red Hat Linux as Radius client and Windows NPS server as radius server balaji2219@gmail.com Linux - Newbie 2 06-29-2015 08:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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

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