<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>> Date: Thu, 29 Nov 2012 16:56:08 +0100<br><div>> From: jhrozek@redhat.com<br>> To: freeipa-users@redhat.com<br>> Subject: Re: [Freeipa-users] FreeIPA manual PAM setup help<br>> <br>> On Thu, Nov 29, 2012 at 10:26:00AM -0500, Rob Crittenden wrote:<br>> > СÁú ³Â wrote:<br>> > >Hi,<br>> > ><br>> > >I've been working on porting the FreeIPA client to Arch Linux lately and<br>> > >I'm now to the last step of the puzzle. Everything works the way it<br>> > >should, except for PAM, which I don't know how to setup.<br>> > ><br>> > >I must admit that I'm very confused my the PAM configuration (which PAM<br>> > >module does what, the order of the modules, etc). What I'm trying to<br>> > >find out is where the pam_sss.so lines should go. Here's a copy of the<br>> > >/etc/pam.d/ directory in Arch Linux: http://ompldr.org/vZ2hxcw/pam.d.tar.bz2<br>> > ><br>> > >I'd greatly appreciate it if someone could help me out :) Thanks!<br>> > ><br>> > <br>> > I gather that this is due to a lack of authconfig.<br>> > <br>> > Timo Aaltonen has been working on ipa-client (and server!) for<br>> > Ubuntu and he ran into similar problems but I'm not sure what<br>> > solution he came up with.<br>> > <br>> > I'll find someone with more PAM experience to try to give you more<br>> > practical help.<br>> > <br>> > rob<br>> <br>> Hi,<br>> <br>> the PAM config files on Arch Linux are a little bit different than what<br>> Fedora/RHEL uses. It seems that the per-service config files (such as<br>> /etc/pam.d/su for logging in with su) directly include the PAM modules,<br>> in your case pam_unix.so only. On Fedora/RHEL, the per-service files<br>> usually include a more generic file called something like system-auth.<br>> <br>> Either way works, but if you'd like to configure more services in a<br>> similar way, then including a common file might save you some edits.<br>> <br>> This document is a little outdated but provides a nice intro into<br>> configuring PAM:<br>> http://tldp.org/HOWTO/User-Authentication-HOWTO/x115.html<br>> <br>> In general you there are fours stacks in PAM, each of them controls one<br>> step in the auth process.<br>> <br>> I think you'll want to use both pam_unix and pam_sss in all the<br>> stacks -- pam_sss is needed for users coming in from the SSSD to log in<br>> and you'll also want to keep pam_unix around so that local users (at<br>> least root) can log in too.<br>> <br>> Here is what my PAM config on Fedora 18 looks like:<br>> --------------------------------------------------------------------<br>> auth required pam_env.so<br>> auth sufficient pam_unix.so nullok try_first_pass<br>> auth requisite pam_succeed_if.so uid >= 1000 quiet_success<br>> auth sufficient pam_sss.so use_first_pass<br>> auth required pam_deny.so<br>> <br>> account required pam_unix.so broken_shadow<br>> account sufficient pam_localuser.so<br>> account sufficient pam_succeed_if.so uid < 1000 quiet<br>> account [default=bad success=ok user_unknown=ignore] pam_sss.so<br>> account required pam_permit.so<br>> <br>> password optional pam_pwquality.so try_first_pass retry=3 type=<br>> password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok<br>> password sufficient pam_sss.so use_authtok<br>> password required pam_deny.so<br>> <br>> session optional pam_keyinit.so revoke<br>> session required pam_limits.so<br>> -session optional pam_systemd.so<br>> session optional pam_oddjob_mkhomedir.so<br>> session [success=1 default=ignore] pam_succeed_if.so service in<br>> crond quiet use_uid<br>> session required pam_unix.so<br>> session optional pam_sss.so<br>> --------------------------------------------------------------------<br>> <br>> If Arch Linux ships the same modules as Fedora, the you should be able to<br>> simply copy and use the PAM config we use.. I've put Honza to CC, I know<br>> he runs Arch Linux as well and might have some insights into how PAM is<br>> configured on Arch.<br>> <br>> _______________________________________________<br>> Freeipa-users mailing list<br>> Freeipa-users@redhat.com<br>> https://www.redhat.com/mailman/listinfo/freeipa-users<br><br>Hi,<br><br>Thanks a lot for your reply! I'll be sure to read up on the link.<br><br>The per-service config files are a bit annoying in Arch. I'm not sure if it's<br>possible, but maybe I can create a /etc/pam.d/sssd that can be included in<br>the other files? I'm guessing that the order of the PAM modules matters, so<br>I'm not sure that that would work.<br><br>I'll try adding pam_sss to each file, based on Fedora's system-auth, and see<br>how that goes.<br><br>Best Regards,<br>Xiao-Long Chen<br></div> </div></body>
</html>