Slashdot Mirror


LDAP Authentication in Linux

hausmasta writes "HowtoForge has published a walkthrough to show you how to store your users in LDAP and authenticate some of the services against it. It will not show how to install particular packages, as it is distribution/system dependent, instead it will focus on pure configuration of all components needed to have LDAP authentication/storage of users. The howto assumes that you are migrating from a regular passwd/shadow authentication, but it is also suitable for people who do it from scratch."

42 of 189 comments (clear)

  1. Re:Why would one want to do this? by Anonymous Coward · · Score: 3, Interesting

    You could now have several machines authenticating against one machine(although I know there are other ways).
    You can also have all your software that is LDAP aware authenticating against the same username/password (assuming they don't already support the stuff like PAM or the like).

    If you really want to, you can also setup samba to use it and you can have XP machines join the domain, get the users in the domain all that fun stuff. (Was going to do this in a small lab I help at, ended up not because I realized it wasn't necessary for anything we did down there).

  2. Re:Why would one want to do this? by Anonymous Coward · · Score: 3, Informative

    You might have more than one machine to string together, and/or a very large number of users, and/or primary account administration happens somewhere else (like Active Directory, let's say) and account enablement/disablement, password resets, etc., should carry over across both environments.

    Put together pam_ldap and pam_krb5 and you can do a lot of nifty stuff. You probably wouldn't care about hardly any of it for a standalone computer, but for a true multiuser system in a multisystem environment... almost anything else is scandalously silly.

  3. Re:Why would one want to do this? by antlope · · Score: 5, Informative

    For the same reasons as one would use NIS in the past, to allow central control and a single point of administration for your users.
    With some decent admin tools you can even share your users between variants of Unix and Windows environments.
    There are some advantages of LDAP over NIS which are worth mentioning. LDAP can be made more secure than NIS (NIS+ is better in this respect, but oh so much more of a pain to administer) through the use of SSL or better authentication methods. LDAP will usually scale better for many thousands of users than plain NIS. NIS is limited as to what data may be stored for a user, which is ok if all you want your user database for is authentication and basic authorization, but LDAP is much more flexible if you need to store other user information and would rather have a single user store.
    There are some sites that even use Unix LDAP clients to authenticate to an Active Directory service running on windows platforms. This can be done much more transparantly with LDAP than many other authentication methods.

    /Anthony Whitehead
    http://www.nordicedge.se/
    NordicEdge AB

  4. Re:Why would one want to do this? by charlesnw · · Score: 3, Informative

    Well not all of us live in our parents basement and have less then 10 systems. Some of use work in enterprise environments with 1000+ servers and would like a central way to manage logins/passwords/auditing. Especially for things like PCI compliance that require it. And no I don't mean PCI as in the system bus interface. I mean payment card industry.

    --
    Charles Wyble System Engineer
  5. Re:Why would one want to do this? by fm6 · · Score: 2, Insightful

    It's amazing how many Slashdotters think that the only computers are those used by individuals. In serious organization, you have hundreds or thousands of people using your systems, and maintaining a separate password file for each one is just unthinkable. So you have a central authentication facility, such as Active Directory, NIS, or LDAP.

  6. Ldap on its own is not enough by Anonymous Coward · · Score: 3, Interesting

    Really, you need to add kerberos to the mix, especially the heimdall kerberos implementation is attractive, since it allows you to store its settings inside the ldap tree, providing a true centralised secure single signon enviroment.

    Using ldap itself is really not much better than using NIS, aside from the fact that it can contain much more than just the user database.

    1. Re:Ldap on its own is not enough by finkployd · · Score: 2, Informative

      Haha

      Active Directory, you mean recreate DCE (Distributed computing environment) using Kerberos for authentication and an x.500 derived directory for storing services and user groups and attributes?

      Microsoft did nothing original with AD except to use LDAP instead of CDS (good move CDS sucks) and try to stuff service registration and discovery into DNS (yuck, LDAP would be much better for that). That said, DCE was way too complicated for most sites to set up, so it is good that MS brought it to the masses in the form of AD. But don't for a second think they invented any of it.

      Finkployd

  7. Re:Password only by Imagix · · Score: 4, Interesting

    Because if you reject a "taken password", you now know another user's password. You can then use it to login as them.

  8. Re:Password only by legoburner · · Score: 3, Insightful

    er because when you reject a taken password, the user has all they need to know to get into somebody else's account!?

  9. I always wondered... by Lispy · · Score: 4, Interesting

    Ever since I rolled out an LDAPed Samba domain for a customer I was wondering why this is not beeing used for more stuff?
    Its relatively eay to setup and quite stable. This in combination with PAM should be the once and for all way of authentication.
    If you have a directory like this you can add virtually everything to it, be it intranet pages, mailserver authentication, hell even an inhouse Jabber client for employees. This should be unified and used much more often.

    The management is a blast with the ability to choose whatever LDAP-Frontend you might wanna use and worstcase you can go back to browserbased or console. Its really flexible, elegant and in a Unix style a tool for the job.

    Who can enlighten me why this is still rather a niche? are Unixadmins simply too used to the passwd/shadow style auth?
    Oh yeah: In case you are going to set it up stay the hell away from BerkeleyDB 4.3.
    It can have some nasty surprises. :) Been there...

    1. Re:I always wondered... by antlope · · Score: 2, Interesting

      Because the sites that could most benifit already run NIS or similar for Unix, and have working AD systems for windows. With a larger site (100+ servers) the admin groups are usually hard presses for time anyway and have to justify this kind of switch to a manager who most of the time doesn't fully see the advantage of spending all those man hours switching systems.

      Sad, but often true.

      /Anthony Whitehead
      NordicEdge AB

    2. Re:I always wondered... by guruevi · · Score: 4, Informative

      It is otherwise widely used hidden under proprietary MS code: Active Directory is a pure Kerberos + LDAPv3 implementation except that for synching and logging in (the essential outside communications that other platforms would like to use) is proprietary and they changed some things to the standard scheme too (SID etc.) which makes it useless for anybody but MS.

      OpenDirectory by Apple is also an LDAPv3 implementation be it more pure than MS's implementation. You can combine both AD and OD on Mac to get a unified Windows-compatible login capabilities in the network that also get the benefits of using OD (force preferences and security settings on users/computers) without schema changes on either side.

      RedHat also relies on LDAP for network-wide authentication in their products as does IBM and recently even Novell and lots of companies use it for different purposes in one or another way.

      --
      Custom electronics and digital signage for your business: www.evcircuits.com
    3. Re:I always wondered... by 93+Escort+Wagon · · Score: 2, Interesting

      Ah, I was about to ask this same question...

      One of our former (and rather forward-looking) sysadmins moved our servers over to a centralized Kerberos+LDAP (via PAM) authentication and authorization system. He left for greener pastures; and since then I've seen a series of (mostly pretty young) sysadmins that just have this innate dislike for any sort of centralized management. It usually starts with complaints about OpenLDAP; but pretty soon you realize it's not the app, since they view any replacements with equal disdain - it's the whole concept that they don't like.

      I see the same sort of thing when it comes to centralized server maintenance/management systems. A lot of guys seem to prefer to just configure and run each server totally independently, even though it takes a rediculous chunk of time compared to a distributed management system. It's obviously inefficient, and the end result often is out of date kernels and/or other packages. So why this fascination with trying to run your workplace servers as if they're no different than the hobby servers in your basement?

      --
      #DeleteChrome
    4. Re:I always wondered... by Wylfing · · Score: 4, Insightful

      Who can enlighten me why this is still rather a niche?

      Maybe you have a brain the size of this guy. I don't know. I have tried a few times in the past to set up LDAP and all the documentation is written by space-aliens as far as I can tell. I can't even penetrate the language used, let alone follow the steps prescribed.

      This Fine Article is no different. After about the 3rd sentence I have no idea what is being described, because we're already talking about "a replication" but this has not been defined. It's all like that: undefined terms and references, and exhortations to read the ldap man pages if you want to understand what is going on. The man pages are also full of undefined terms and references, except they are presented in highly-compact text blocks with bad grammar.

      LDAP is niche because it is so freaking impossible to figure out. That's why.

      --
      Our intelligent designer has never created an animal that we couldn't improve by strapping a bomb to it.
    5. Re:I always wondered... by spauldo · · Score: 3, Informative

      recently even Novell and lots of companies use it for different purposes in one or another way

      Novell's been using it longer than pretty much anyone. Check out NDS for more info. Microsoft was more or less copying Novell, not any of the UNIX vendors (who were mostly still using NIS and friends when active directory came out).

      --
      Those who can't do, teach. Those who can't teach either, do tech support.
  10. Other options by digitalhermit · · Score: 2, Informative

    OpenLDAP is great and does a good job. You may also want to look at Fedora Directory Server, which is based on a previously commercial product. Both are ridiculously easy to configure for basic authentication. Another option for OpenLDAP is to grab the VMWare OpenLDAP appliance. It's an easy way to get LDAP working.

    For administration, check out JXplorer. It makes it easy to add/delete/modify users.

    1. Re:Other options by hethopus · · Score: 2, Informative

      Best one I've used is Luma -- http://luma.sourceforge.net/

  11. Re:Password only by David+McBride · · Score: 2, Insightful

    If you have a system which has 50,000 users, then logging in would require that the system check the input passphrase against every single stored password hash until it hit the right one. This is expensive, and doesn't scale.

    (Unless, of course, you speed up the backend by storing each end-user's passphrase in clear -- but that's very bad, as a successful attack on one of the authentication servers could immediately reveal the plaintext passphrase of every user.)

    So we make users type in their username first. They need to have a username on the system anyway, and it's generally something that's easy to remember and changes infrequently, if at all.

  12. LDAP for everything by linuxkrn · · Score: 4, Interesting

    I use LDAP at work for everything and life is so much better now.

    Windows Desktops (Samba PDC and BDC -> LDAP)
    Linux pam_ldap + nss -> LDAP and NFS shares

    You can log into either a windows desktop or linux box and have the same file shares open. Windows has H: and Linux is /home/username. Public drives are mapped as well.

    Then for email, postfix + dovecot -> ldap. You can store not only use the same username password as for linux, but you can add unlimited number of real-time mail aliases to each user. Also supports virtual domains.

    Directory services for phone numbers, room locations, etc. in ldap. Mapped to email clients search/contact lists.

    squid + ldap and apache + ldap, secure login to website.

    Squirrelmail/horde both use ldap as well. Auth is done via imap, but horde can do much more with ldap. Both can use it for directory services.

    Admin can be done either via CLI smbldap-tools, php ldap admin, gq (ldap tree browser), or ldapmodify if you're hard core. Plus with sync'ing data to other sites they have a copy of the data for their BDC/etc. If I need to add/modify a user there is only one place that needs to be modified. And I can do it from home. =)

  13. Re:Why would one want to do this? by LinuxDon · · Score: 2, Insightful

    Quote: "Besides geek points, why would one want to do this? There is an old saying....If it ain't broke, don't fix it."

    Try changing your root password on 10 different servers on a regular basis.
    Then issue accounts for 55 people on a combination of those servers, depending on which kind of job they do.
    Also, each of those servers run different services, which some people need to have access to.

    This leads to the situation where it is very common for people to have 6 different passwords, and this is the situation I find myself in right now.
    The situation also leads to a lot of support calls with requests to reset a password, since people find it hard to keep track of their passwords.

    I've actually been looking for a solution that is described in the article, but I've failed to find it all out myself within a reasonable timeframe.
    It's best to start out with a step-by-step tutorial like the article, and then expand the solution yourself over time.
    So I am very happy with this article!

  14. Our wiki Linux LDAP Howto by Anonymous Coward · · Score: 3, Informative

    I figured this was as good time as any to point out our relatively complete Linux LDAP HOWTO, which covers quite a few LDAP servers (MS AD, Novell eDir, OpenLDAP) and the security implications of different setups (eg. using PAM_LDAP vs just using NSS_LDAP). The article lives in a wiki so any improvements are welcome. :-)

    I hope you find it useful.

  15. Re:Why would one want to do this? by ximenes · · Score: 2, Informative

    It is possible to distribute those kinds of maps over LDAP as well, if you have control over adding data to your LDAP server.

    You can also keep NIS around just for those maps.

  16. Re:Why would one want to do this? by antlope · · Score: 4, Informative

    Most of the common maps, including the auto-mount maps have schema and attributes in LDAP. So its just a simple matter of using a migration tool (or doing it by hand) to build your LDAP version of the auto-mount map.

    A quick google and here is a link you might like to look at:

    http://www.linuxjournal.com/article/6266
    There are many other sources of information on this out there.

    Anthony Whitehead
    NordicEdge AB

  17. LDAP/Postgres? by Doc+Ruby · · Score: 2, Insightful

    LDAP authentication is cool, but LDAP is just an interface. Unfortunately, it usually comes bundled monolithically with a dedicated datastore, the BerkeleyDB. Which is neat and fast, working well for "standalone LDAP". But it ghettoizes ID info away from other apps which don't already have an LDAP interface. Some of which need relational access for their app logic, or just higher performance than massive volumes of LDAP queries will permit. The OpenLDAP server is stuck this way. Its basic features are really good, but that's as far as it goes.

    So where's the HOWTO for porting OpenLDAP to Postgres for its datastore? There's some HOWTOs for porting it to MySQL, but MySQL doesn't scale as well as Postgres, and existing Postgres installs are out of luck. The few existing LDAP/Postgres HOWTOs seem inconclusive, untested. And some of the commercial products that advertise the feature don't even respond to emails to sales departments asking about the cutover.

    As long as Slashdot is staring down "LDAP Auth in Linux", how about taking it to (and over) the Postgres wall?

    --

    --
    make install -not war

  18. SPLAT - Scalable Periodic LDAP Attribute Transmogr by lizthegrey · · Score: 3, Informative

    https://dpw.threerings.net/projects/splat/ (written by the wonderful people I work with and BSD-licensed) hooks into LDAP, allowing for the storage of public keys for SSH access and other niftiness. We use it for managing passwordless SSH-key based access to the two dozen or so servers here with great success.

  19. Host-based control by sparr0w · · Score: 2, Informative

    The author failed to point out one of (IMHO) the neatest parts of doing PAM/NSS/LDAP authentication against your server: controlling by host. The LDAP authentication set includes the ability to dictate (using the "host" attribute) which users are allowed on which servers. From an enterprise POV, that helps limit the systems users have access to (controlling which servers your UNIX gurus have access to). You can also tie LDAP into Samba, and using some scripts emulate an active directory. We've been playing with this whole idea for awhile now where I work, to essentially create a mixed environment where Linux/UNIX and Windows can play (somewhat) nicely together. Hopefully this article will bring some more people on board with LDAP authentication for servers....

  20. Nested groups by Yag · · Score: 3, Interesting

    The big problem with ldap is that most of autentication plugins (apache, pam and the others) matches only first level group members, not nested groups, normally used, expecially, in big micro$oft directories. This creates a lot of "difficul to mantain" groups containing very big lists of accounts. I know that filters or organizational units can be used to group them, but most of the times this is not enaugh. For this reason i usually prefer radius which integrates well *nix and m$ worlds (even if i still use ldap for apache cause radius mod for apache is not so customizable).

  21. Re:Why would one want to do this? by rmallico · · Score: 4, Interesting

    i work for a company that handles large enterprises single sign on and user id consolidation needs... (as well as small/medium ones as well)

    you are right on... when it comes to compliance and SOX requirements, getting all of your machines authenticating against one directory (AD or otherwise) makes perfect sense. I am sure there are a few sys admins here who have been asked for login failure and share access permissions across all of their network machines. adding more 'directories' makes it even more fun to gather these reports, comb through logs, look for changes across all the flavors of *nix and then the msft event logs, even network syslog...

    There are a few companies out there who have built product lines that allow unix machines to authenticate against AD, their machine accounts can have Windows Group Polices and managed under one single console, they have the ability to appear in SMS as any other machine for reporting and hardware inventory and also to send their performance metrics over to MSFT MOM...

    Why in the HELL would anyone want to authenticate against AD? well, it is simple really.. MSFT DID do the LDAP/Kerberos thing right and have been doing it right for a long time. They also have the whole pass-through, single id thing going and it works just fine in AD (when its an all windows network)... and its EVERYWHERE... how many LARGE companies are using whitepages/ldap type directories for authentication and how many are using AD? its a valid question to ask and what is happening is that most ARE already on AD or are moving to AD and they ARE using Exchange and this put AD into a space of being one of the main components of an enterprise. So why not just toss the unix machines in there as well?

    yes, it empowers windows AD... but the first solution below (from quest) does not take anything out of the unix guys bag of tricks... in fact it allows for the unix guy to actually do things against AD that before was a pain to setup/admin...

    anyway... sunday, should be out walking the dog and playing frisbee with the kids or working on my short game... check out http://www.quest.com/landing/?ID=531 or http://www.centrify.com/ for some good info on two companies that are doing this for the *nix world now...

    --
    sig goes here!
  22. LDAP is NOT an authentication service by KidSock · · Score: 3, Insightful

    This tutorial should have some major security warnings plastered all over and I see nothing to that effect so here's a suppliment.

    First, LDAP is NOT an authentication service. I cringe a little whenever someone mentions using "LDAP authentication" for anything other than LDAP clients. Some of these tools use LDAP as a make-shift "pass-through" style authentication service. This is like passing credentials to an SSH server to authenticate web clients (only SSH would be more secure since it enforces confidentiality and integrity).

    Second, if you are going to use LDAP like this, make sure the bind is being conducted over SSL. Using SASL would be even better but that's a little harder for a long lived service account and somewhat pointless if you already have Kerberos setup. With a plain bind you're sending passwords in clear text. Do not ever do that or someone will eventually come to your cube asking funny questions.

    Finally, using LDAP as an authentication service does not provide Single Sign-On (SSO). You basically have to store some kind of token in the user's HTTP session which means someone could get your session ID and impersonate you (e.g. inadvertantly send a link with a session ID in it).

    In general I don't recommend using LDAP as a make-shift authentication service as it is very easy for it to be insecure. Use Kerberos through and through people. It's the correct way to do things, it scales well and it's portable across both UNIX and Microsoft.

  23. I pride myself ... by Zombie+Ryushu · · Score: 4, Interesting

    I believe I have one of the most advanced LDAP/Kerberos/Samba/Bind "Open Directory" setups. I have two Samba 3 Domain Controllers, both Kerberos and Bind Enabled. with OpenLDAP and MIT Kerberos. I have no need for NFS.

    My OpenLDAP stores:

    POSIX User Attributes
    Samba User Attributes
    Radius User Attributes
    eGroupware User Attributes (Egroupware accounts.)
    DNS Information for our internal DNS Server
    DHCP Lease information.

    I use Kerberos with ssh-agent to distribute software RPMS for Mandriva Linux to mass distibute RPMs with a single command.

    I have Samba Kerberos enabled so that Samba will not repeatedly ask for usernames and passwords, and requires zero configuration.

    I have had the code to Egroupware modified so that eGroupware, and Nagios can use Apache's mod_auth_kerb addon to authenticate eGroupware users with a single click instead of a whole second login process.

    I'm currently workong on creating a Samba Authenticated gateway with NTLM-SPNEGO support so that kerberos will handle Squid too.

    All I need now is for someone to make the modifications nesessary to eGroupware's XMLRPC so that Kontact could use Kerberos and I would have the "Exchange Killer" I always wanted.

    All of my users use Samba for network browsing under KDE's Konqueror, with Kerberos and LDAP, it just works.

    I consider this my shining accomplishment.
    I like to have myself believe that I accomplished "Active Direrctory" under Linux now. I don't use Windows at all in this network, so keep that in mind. The eGroupware people can attest to what a past I am. bugging them to include Kerberos detection in session management. But it all works.

  24. Re:Why would one want to do this? by jgrahn · · Score: 2, Insightful
    If all you need is authentication, LDAP is overkill - just use kerberos.

    Huh? Surely Kerberos is more complex than plain LDAP authentication?

  25. Reliability by Gaima · · Score: 2, Interesting

    Yep centralised user management, great, no doubt.
    But, what happens when the LDAP service isn't available?
    I say service to not distinguish between a physical server, a cluster of servers, a crashed openLDAP process, broken network link, yadda, yadda, yadda.

    With AD if a PDC isn't there, you can still login if you've logged on before.
    The article really should have mentioned nss_updatedb and pam_ccreds from PADL (I don't know if there are any other alternatives, nor do I know if that actually work, sounds like they do though).

    1. Re:Reliability by myowntrueself · · Score: 2, Interesting

      But, what happens when the LDAP service isn't available?

      Indeed...

      Where I work one of my 'genius' predecessors set up a Linux fileserver with LDAP 'authentication' (nice euphemism that). LDAP is only used for samba fileshares... and for login.

      The LDAP server runs on the fileserver itself, so at least it doesn't have to connect to a remote LDAP server.

      He did a lovely piece of work, hacking it into place on a debian woody system, butchering the PAM config to make it appear to work.

      He is long gone but his legacy remains; if the LDAP system falls over you can't log onto the server at all.

      Not as root, not on the console, not remotely, not even via a remote logon with ssh keys.

      Fantastic. What a genius.

      The best one can do is reboot it and hope that the LDAP system does come back up.

      I'd fix it but its so hacked together and my LDAP knowledge is limited (as, evidently, was his) and the server is no longer mission critical (I'm about to strip it for parts).

      I would never, *ever* use LDAP for logon 'authentication'. Maybe for samba but I'd be very careful about getting LDAP involved with a console logon.

      --
      In the free world the media isn't government run; the government is media run.
    2. Re:Reliability by 19thNervousBreakdown · · Score: 2, Informative

      I'd change it back, or if you're not using NIS, give just "passwd: files ldap" a shot, both files and compat are redundant at best. Whichever PAM file you have there is odd, auth should fail if a "required" module doesn't succeed. Here's mine:

      auth required pam_env.so
      auth sufficient pam_unix.so likeauth nullok
      auth sufficient pam_ldap.so use_first_pass
      auth required pam_deny.so

      account sufficient pam_unix.so
      account sufficient pam_ldap.so
      account required pam_deny.so

      password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
      password sufficient pam_unix.so nullok md5 shadow use_authtok
      password sufficient pam_ldap.so use_authtok
      password required pam_deny.so

      session required pam_limits.so
      session required pam_unix.so
      session required pam_mkhomedir.so skel=/etc/skel umask=0077
      session optional pam_ldap.so

      Basically, make sure that pam_unix is before pam_ldap, that they are both "sufficient", and put a required pam_deny.so at the end, and your passwd should override any ldap. Also make sure to check both /etc/pam.d/* and /etc/pam.conf. pam.d should override pam.conf, but it doesn't hurt to check. The pam.d dir will probably have different files for different services, so make sure to check ssh if you're having a problem with that, login if it's with console logins, and so on. They might include other files, but whoever edited them might have changed stuff. HTH.

      --
      <xml><I><am><so><damn>Web 2.0</damn></so></am></I></xml>
  26. LDAP is a pain in the arse by SnapperHead · · Score: 2, Interesting

    Few years ago, this was a common setup I would put in place. When I had a number of users accessing all different types of devices or services, I would setup an LDAP server and have everything auth against it. It worked well, but has 2 major flaws.

    Total pain in the ass to setup
    Total pain in the ass to maintain

    Now, I am using radius for the same thing. It works a lot better, because lets face it. PostgreSQL or MySQL is a hell of a lot easier to work with then LDAP.

    LDAP does have its place. If you are looking to tie more then just auth into a profile, then LDAP is the choice. If you just want auth, use something Radius.

    Of course, if you are a total LDAP guru, you are gonna recommend LDAP. But for average admins, or quick setups. LDAP isn't the way to go.

    --
    until (succeed) try { again(); }
    1. Re:LDAP is a pain in the arse by unsigned+integer · · Score: 2, Informative

      Yeah, no kidding. Total pain in the ass.

      I tried to take a NIS domain, mixed linux/solaris clients and convert into a single LDAP auth'ing environment, plus LDAP auth for our webservers ... thus giving me finally a SSO environment where I didn't have to maintain numerous passwd files, etc. I went from knowing nothing about LDAP, to at least being able to set it all up. Even with the PADL tools things took a while. Setting up all the SSL certs ... self-signing etc. Incorrect examples and docs from people online. Yeah, then try to make Solaris play well with OpenLDAP ... all sorts of little hacks involved in that. Then enjoy the fun of getting Apache up and running and properly using LDAP. Lots of little things that can go wrong there, unless you follow things to a T. It was like two steps forward, 1 step back all the friggen time. Would have been probably 10x easier had I just been a pure linux shop ...

      I must say, despite all the pain, it was absolutely beautiful when it was working. I even managed to get all the auto mount maps working as well ... the only thing I didn't get a chance (before I left) was to get our NetApp using LDAP. Another thing that "should have just worked" but didn't. Much like everything else along the road of LDAP.

  27. Re:Why would one want to do this? by myowntrueself · · Score: 3, Insightful

    Try changing your root password on 10 different servers on a regular basis.

    You aren't thinking of putting your root login under LDAP are you?

    Not meaning to be rude, but please, don't be such an idiot.

    What happens when the LDAP server falls over and you are at the console and you try to login as root... and it can't authenticate root because the LDAP subsystem is down? Reboot and pray that LDAP starts up ok?

    --
    In the free world the media isn't government run; the government is media run.
  28. Re:Why would one want to do this? by Schraegstrichpunkt · · Score: 2, Interesting

    Unix login doesn't have separate "username" and "domain" prompts like WinNT does. So here's what you do: Make "root" always a local user, and if you need an centralized "administrator" user, you create another user and add it to the "wheel" group or to /etc/sudoers or whatever, and that user can run "su" or "sudo -s" to get a root shell when necessary.

    Funny story: A few years ago, we were testing Active Directory on some Win2K boxes. One of the security policies you can set is "disable the local administrator account". This can be set on the domain controller and propagated to all the clients. The problem with this is that, if you take a Windows workstation, and have it join a domain with this setting enabled, then almost immediately have it leave the domain, the "disable the local administrator account" will stay set. If you log out, you won't be able to log in again, and without logging in as an administrator, you can't re-join the domain.

    It's a nice way to hose a Windows install.

  29. This rocks by PenguinX · · Score: 4, Interesting

    We switched to ldap authentication on our UNIX systems about a year ago, and basically it rocks. Providing single-sign-on between all of your device of varying operating systems and utility (i.e. servers, routers, switches, terminal/console servers, a lot of applications, and even kvm's) is great when you have a multi-teared support organization, and even if you don't you can still save yourself a lot of useradd / usermod /userdel commands if you centralize.

    Why does it rock so much? LDAP seems unique that, unlike almost every other authentication method under the sun (NIS, NIS+ radius) it can be used on a number of devices. Additionally LDAP tends to be a great back-end for other authentication protocols (i.e. radius) can use an LDAP backend.

    Practically speaking, often times all someone needs to do is have read access to a device to find out if an interface is up but many system admins give up if they don't have the ability to centralize and allow the company to become altogether too dependent on them. LDAP basically gets rid of this hassle and the administration is minimal. This means that the system admin gets paged less and more people can get work done with better efficiency.

  30. Re:Why would one want to do this? by finkployd · · Score: 3, Informative

    Huh? Surely Kerberos is more complex than plain LDAP authentication?

    And a HELL of a lot less secure. You would be better off doing nothing than doing plain LDAP authentication.

    And for large insitutions, Kerberos gives you a credential that can be used multiple places. NFS, AFS, websites (with SPEGNO goodness), may services such as SSH, IMAP, etc.

    Unless this is for a 192.168 network in your basement, there is NEVER a good reason to do LDAP authenticaion. That is not what it was designed for, and certainly not something it is good at.

    Finkployd

  31. As was already mentioned..... by FlyingGuy · · Score: 2, Informative

    Just use Novell Directory Services, or EDirectory as it is now named.

    Nope it aint free, nope it aint open source. But it DOES rock the house!

    Scales to over a billion objects. Easy administration and setup.

    Runs on practicaly everything Form Linux, Unix, Solaris, Windows, Copiers, Printers to Toasters and Web Servers.

    Why yes I am a Novell Fan Boy. Whats your fucking point!

    --
    Hey KID! Yeah you, get the fuck off my lawn!
  32. Re:Why would one want to do this? by shayne321 · · Score: 2, Interesting

    Amen.. This is such a no-brainer to me. I implemented a similar service at a previous employer back before AD was even heard of (1997 or so). Basically I wrote a web UI which the helpdesk could access to add/change/delete accounts, which only updated entries in a mysql database (the web app never talks directly to individual servers, for security reasons). Each server in turn queries the DB once an hour and updates the local passwd, shadow, smbpasswd, sasldb, group, etc files as accounts are added/changed/removed. The only drawback is it takes up to an hour for a change to fully propogate though all servers. The good thing though is that to the apps the authentication is local (they just use the local files), so if the DB server poops its pants those services (samba, dovecot, sendmail, etc) are still available. Plus, the apps don't need to have intelligence about the DB, LDAP, NIS, etc.. They just use their local files like always. I rounded this out with freeradius with an sql module (for wireless, vpn, and dial up), and mod_auth_mysql for apache for the intranet. This allowed us to offer ONE username/password for every possible service on the network, and fine grained control via the web UI of each user's access to each service. Through the web UI we could enforce strong passwords, auto-generate the user's login, etc, etc. I *never* had to touch servers for accounts (other than root, which was never handled from the db), and the helpdesk really liked having an easy to use UI rather than being forced to ssh or telnet directly to servers (which would have been a nightmare). The only issue with this setup is each server needs to be able to talk directly to your SQL server, but as long as you manage this correctly (restricted permissions, etc) it's workable.

    --
    Today I didn't even have to use my AK; I got to say it was a good day -- Icecube