LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 04-18-2024, 04:42 AM   #1
Greg.G
LQ Newbie
 
Registered: Apr 2024
Posts: 4

Rep: Reputation: 0
SSSD and local user


I encounter a problem when I want to connect with the local user WITHOUT the network connection.

When the network comes back, no problem with local users and ldap (SSSD) users. The SSSD is configured and working.

According to my research it's in /etc/pam.d in the "common-*" configuration files:
  • common-account
  • common-auth
  • common-password
  • common session
Do you know where the blockage comes from? The behavior without the network in the login menu, when entering the password, is in vain.

Here are my common-conf files:

common-account:

Code:
 account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so
 account requisite pam_deny.so
 account required pam_permit.so
 account sufficient pam_localuser.so
common-auth:

Code:
 auth [success=2 default=ignore] pam_unix.so nullok_secure
 auth [success=1 default=ignore] pam_sss.so use_first_pass
 auth requisite pam_deny.so
 auth required pam_permit.so
 auth optional pam_cap.so
common-password:

Code:
 password requisite pam_pwquality.so retry=3
 password [success=2 default=ignore] pam_unix.so obscure use_authtok try_first_pass sha512
 password sufficient pam_sss.so use_authtok
 password requisite pam_deny.so
 password required pam_permit.so
 password optional pam_gnome_keyring.so
common session:

Code:
session [default=1] pam_permit.so
 session requisite pam_deny.so
 session required pam_permit.so
 session optional pam_umask.so
 session required pam_unix.so
 session optional pam_sss.so
 session optional pam_systemd.so
 session optional pam_oddjob_mkhomedir.so
 session required pam_mkhomedir.so skel=/etc/skel/umask=0077
Thank you.

Last edited by Greg.G; 04-25-2024 at 05:11 AM.
 
Old 04-19-2024, 10:52 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,817

Rep: Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144
Can you be more explicit about what you mean by network connection? Or do you mean that you can't login as a local user when not connected to the LAN. What is the issue that you're trying to solve here?

Last edited by ferrari; 04-19-2024 at 10:53 PM.
 
Old 04-19-2024, 11:03 PM   #3
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,817

Rep: Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144
If you are trying to achieve offline authentication, this will rely on the online authentication credentials being cached first. For that you'd need to set
Code:
cache_credentials = true
in '[domain/LDAP]' section of the /etc/sssd/sssd.conf first.

Once you have authenticated online, you should then be able to authenticate while offline (eg with the network cable unplugged).

Last edited by ferrari; 04-19-2024 at 11:04 PM.
 
Old 04-22-2024, 05:12 AM   #4
Greg.G
LQ Newbie
 
Registered: Apr 2024
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ferrari View Post
If you are trying to achieve offline authentication, this will rely on the online authentication credentials being cached first. For that you'd need to set
Code:
cache_credentials = true
in '[domain/LDAP]' section of the /etc/sssd/sssd.conf first.

Once you have authenticated online, you should then be able to authenticate while offline (eg with the network cable unplugged).

What I'm looking for is when the machine has no network cable plugged in => No local network and internet connection.

I would like to log in with the user that was created locally on the machine.

But with my SSSD configured and my /etc/pam.d/ files I cannot connect with this user when the network cable is unplugged.

I looked at redhat's SSSD to see if there was an error in my configuration and apparently everything is ok: https://access.redhat.com/documentat...zation-in-rhel

I also check if caching should be enabled in SSSD, it is fine.
 
Old 04-24-2024, 03:20 AM   #5
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,817

Rep: Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144
Share the [sssd] and [pam] sections of sssd.conf please.

Check PAM configuration:
https://access.redhat.com/documentat...ration_Options
 
Old 04-25-2024, 02:54 AM   #6
Greg.G
LQ Newbie
 
Registered: Apr 2024
Posts: 4

Original Poster
Rep: Reputation: 0
Here is my sssd.conf file (I have deliberately hidden certain parts for confidentiality):

Quote:
[sssd]
config_file_version = 2
services = nss, pam
domains = ldap

[nss]
filter_users = root,ldap,named,avahi,haldaemon,dbus,radiusd,news

[pam]

[domain/ldap]
id_provider = ldap
auth_provider = ldap
access_provider = ldap
chpass_provider = ldap
ldap_id_use_start_tls = True
cache_credentials = True
ldap_search_base = dc=id,dc=XXX,dc=XXX
ldap_uri = XXX
override_homedir = /home/%u
debug_level = 5
ldap_tls_cacert=XXX
enumerate = true
ldap_tls_reqcert = request

According to your link, the part is missing:
Quote:
[pam]
offline_credentials_expiration = 2
offline_failed_login_attempts = 3
offline_failed_login_delay = 5
I'm going to test with these lines.
 
Old 04-25-2024, 04:27 AM   #7
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,817

Rep: Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144
I notice in your opening post that you have entries with the control value of 'requirment' eg
Code:
auth requirement pam_deny.so
I'm not sure if this is valid or not. Most documentation I've read refer to 'requisite' instead eg
Code:
auth requisite pam_deny.so
Hopefully others can clarify this.

I would have expected common-auth to look more like this
Code:
auth    [success=2 default=ignore]      pam_unix.so nullok_secure
auth    [success=1 default=ignore]      pam_lsass.so try_first_pass
auth    requisite                       pam_deny.so
auth    required                        pam_permit.so
autho   optional                        pam_cap.so
In any case, you can use the sssctl command to check your SSSD configuration (as mentioned in the link I gave already)...
Quote:
Test That the Integration Works Correctly

*Try logging in as a user.

*Use the sssctl user-checks user_name auth command to check your SSSD configuration. For details, use the sssctl user-checks --help command.

Last edited by ferrari; 04-25-2024 at 04:29 AM.
 
Old 04-25-2024, 05:06 AM   #8
Greg.G
LQ Newbie
 
Registered: Apr 2024
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ferrari View Post
I notice in your opening post that you have entries with the control value of 'requirment' eg
Code:
auth requirement pam_deny.so
I'm not sure if this is valid or not. Most documentation I've read refer to 'requisite' instead eg
Code:
auth requisite pam_deny.so
Hopefully others can clarify this.

I would have expected common-auth to look more like this
Code:
auth    [success=2 default=ignore]      pam_unix.so nullok_secure
auth    [success=1 default=ignore]      pam_lsass.so try_first_pass
auth    requisite                       pam_deny.so
auth    required                        pam_permit.so
autho   optional                        pam_cap.so
In any case, you can use the sssctl command to check your SSSD configuration (as mentioned in the link I gave already)...
I translated it wrong, I updated my pam.d files

With the translation (FR/EN) it put “requirement” into “requisite”

Last edited by Greg.G; 04-25-2024 at 05:13 AM.
 
  


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] sssd: Benign local domain sssd.conf needed boxyzzy Linux - Server 1 10-06-2016 01:31 PM
SSSD can't find user from time to time lux209 Linux - Software 1 08-28-2016 09:50 AM
[SOLVED] sssd fail to find user from time to time lux209 Linux - Software 1 08-24-2016 08:17 AM
rhel6 sssd ldap for authentication and local files for userNumber (unix uid). mwd Linux - Enterprise 1 08-22-2011 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 01:41 AM.

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