SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
Pluggable Authentication
Module

                           Ahmed Madkour
The Authentication Problem



    – Traditionally, UNIX authentication is done by comparing the (encrypted) password
      for users in the password file /etc/shadow.
    – Each program that requires authentication implements its own authentication
      mechanisms.
    – Authentication mechanism becomes more visible when you add various applications
      that are doing some sort of authentication.
    – Like: Logging from a graphical user interface using display managers.
    – Services like : FTP, TELNET, IMAP, SSH.
    – As a system administrator you will end up spending a lot of time maintaining many
      user database besides /etc/passwd.
Need for PAM



   – With PAM, the system administrator can use the same user database for every login
     process of your system.
   – It is possible to use more than one underlying authentication mechanisms (back end)
     controlled by PAM and transparent to the users.
   – PAM-aware applications will not break if the system administrator changes the
     underlying authentication configuration.
   – Using PAM for authentication requires much less programming than developing a
     complete set of authentication functions.
History of PAM



     – In 1995, developers from Sun Microsystems implement a generic
       framework for Solaris.
     – In Aug 1997, when Solairs 2.6 was released PAM was an integrated
       component of the operating system.
     – In Feb 1997, the Linux-PAM project began
     – Now most GNU/Linux distributions today are using PAM.




                                                                          4
Theory of Operation


    – The theory of operations is independent of the operating system and PAM
      implementation.
    – In order to configure PAM successfully, you need to have all the components
      working together correctly.
    – PAM framework is complex and not forgiving when it comes to errors.
PAM File System Layout


           /   lib
                                 libpam.so.0
                     security
                                               pam_unix.so

                                               pam_deny.so
               etc
                                  pam.conf
                      pam.d
                                               login

                                               ssh

                                               other
                     security

                                               access.conf
               usr
                                                pam_mount.conf
                     include
                                security
                                                       pam_modules.h
                                                       pam_appl.h
                                                       pam_misc.h
PAM File System Layout (Cont.)



    – The PAM-aware applications are linked against the PAM library, which
      located in /lib/ directory with the name libpam-X.so.0
    – Configuration of PAM can be done in two ways
        ‱ Put everything in one single file /etc/pam.conf
        ‱ Or split the configuration by service in the directory /etc/pam.d
    – Some PAM modules required configurations files beside the PAM
      configuration to operate.
PAM Framework



   – PAM relies on dynamically loaded modules.
   – A module can provide mechanisms to authenticate user information stored in a
     particular back end.
   – A PAM service module is a shared library that provides authentication and
     other security services to applications such as login, or telnet.
   – The four types of PAM services are:
       ‱ Authentication service modules.
       ‱ Account management modules.
       ‱ Session management modules.
       ‱ Password management modules.
PAM Framework (Cont.)



   Application

                                            PAM Services Modules
     Login
                 PAM       PAM Lib
                 API   /lib/libpam.so


    Telnet                               pam_      pam_      pam_
                                        unix.so   ldap.so   mount.so
                                Pam.
                       pam.d
                                conf
    Other
                                                              /etc/
    Appl
                                                            security/
                                         /etc/    LDAP
                                                             pam_
                                        passwd    server
                                                             mount.
                                                              conf
Management Groups



    – Each Service can use PAM in four different stages of the Authentication
      process.
    – These stages are called management groups.
    – A module provides the functionality for one or more management Groups.
    – You can think about it as a different module for each group.
Management Groups (Cont.)


 The Auth Group

     – Provides two functions:
        ‱ First the user can be validated
        ‱ Second, credentials are granted by the auth management group
Management Groups (Cont.)


 The Account Group
     – The access to a service is controlled by the account management group.
     – You might only be allowed to use a service
        ‱ A number of times per week.
        ‱ In certain periods of the day.
        ‱ Or, if your account is not yet expired.
Management Groups (Cont.)


 The Session Group

     – The environment for a given service is built up by the session management group.
     – When you stop using a service , the session groups tears down the environment.
     – When creating the environment the data required for proper operation will be
       loaded.
Management Groups (Cont.)


 The Password Group

    – It is only used when a user wishes to update the password.
    – With PAM you separate passwords changing applications from the back-end
      storage.
Stacking



    – For each management groups you can define a set or a stack of modules,
      which are used in turn.
    – The order of calling is determined by the order in the configuration (service)
      file.
    – Changing the order in the stack might have great impact on the functionality.

        auth [success=1 default=ignore] pam_unix.so nullok_secure
        auth [success=1 default=ignore] pam_unix.so nullok_secure
        auth required                   pam_permit.so
Control Flags



     – A module can either return success or failure.
     – Some answers are more important than others.
     – The control flags can change the flow and how decisions are made.
Control Flags (Cont.)


   Requisite
     – If is the strongest of the flags.
     – If a module is flagged as requisite, and it fails, PAM will return to the calling
       applications instantly and report the failure.
Control Flags (Cont.)


   Required
     – The return code for a required module is stored.
     – In the case of failure, execution is not stopped but continues to the next module.
     – When the stack of modules has been executed, and at least one required module
       has failed, PAM will return failure to the calling application.
Control Flags (Cont.)


  Sufficient
      – A sufficient module can actually be quite strong.
      – The processing of the stack is stopped if a sufficient module returns OK, if
        no previous required module has failed.
      – If there are required modules after the sufficient modules, these modules
        are not called.
Control Flags (Cont.)


   Optional
     – A failure does not alter the execution of the stack as in the case of the requisite
       flag.
     – The return code is ignored, and neither failure nor success is taken into account
Developing with PAM


 PAM Application
                   Application                    PAM runtime                    Module
                           pam_start

                                           Data structure
                                           initialized
                           pam_handle



                                           Checking user
                           pam_auth


                                                                                 pam_unix



                        Conversation
                         function



                                        pam_end
                                                                Data structure
                                                                 destroyed
   time
References


    –   The Definitive Guide to PAM for Linux SysAdmins and C Developers.
    –   The Linux-PAM Guides http://www.kernel.org/pub/linux/libs/pam/
    –   Linux CBT PAM.
    –   PAM manual pages.
Session End




   Thank You

    Ahmed Madkour
ahm.madkour@gmail.com

Weitere Àhnliche Inhalte

Was ist angesagt?

Structure of operating system
Structure of operating systemStructure of operating system
Structure of operating systemRafi Dar
 
2.Operating System Structures
2.Operating System Structures2.Operating System Structures
2.Operating System StructuresSenthil Kanth
 
Operating System Structure (documentation)
Operating System Structure (documentation)Operating System Structure (documentation)
Operating System Structure (documentation)Navid Daneshvaran
 
Virtualization Training
Virtualization TrainingVirtualization Training
Virtualization TrainingArcadian Learning
 
Solution to java updation problem
Solution to java updation problemSolution to java updation problem
Solution to java updation problemKrishna Veni
 
OS Functions and Services
OS Functions and ServicesOS Functions and Services
OS Functions and Servicessgpraju
 
Ovms ops manager_admin
Ovms ops manager_adminOvms ops manager_admin
Ovms ops manager_adminsati1981
 
Comprehensive Information on Tomcat
Comprehensive Information on TomcatComprehensive Information on Tomcat
Comprehensive Information on TomcatHTS Hosting
 
Studying a decade of Linux system calls
Studying a decade of Linux system callsStudying a decade of Linux system calls
Studying a decade of Linux system callscorpaulbezemer
 
Unit 1 ppt
Unit 1 pptUnit 1 ppt
Unit 1 pptGRajendra
 
Creating templates
Creating templatesCreating templates
Creating templatesSyAM Software
 

Was ist angesagt? (20)

Ch06
Ch06Ch06
Ch06
 
Structure of operating system
Structure of operating systemStructure of operating system
Structure of operating system
 
App A
App AApp A
App A
 
Ch10
Ch10Ch10
Ch10
 
2.Operating System Structures
2.Operating System Structures2.Operating System Structures
2.Operating System Structures
 
Operating System Structure (documentation)
Operating System Structure (documentation)Operating System Structure (documentation)
Operating System Structure (documentation)
 
System call
System callSystem call
System call
 
Virtualization Training
Virtualization TrainingVirtualization Training
Virtualization Training
 
Solution to java updation problem
Solution to java updation problemSolution to java updation problem
Solution to java updation problem
 
Ch04
Ch04Ch04
Ch04
 
OS Functions and Services
OS Functions and ServicesOS Functions and Services
OS Functions and Services
 
Harsh
HarshHarsh
Harsh
 
Ovms ops manager_admin
Ovms ops manager_adminOvms ops manager_admin
Ovms ops manager_admin
 
System calls
System callsSystem calls
System calls
 
System Calls
System CallsSystem Calls
System Calls
 
Ch1
Ch1Ch1
Ch1
 
Comprehensive Information on Tomcat
Comprehensive Information on TomcatComprehensive Information on Tomcat
Comprehensive Information on Tomcat
 
Studying a decade of Linux system calls
Studying a decade of Linux system callsStudying a decade of Linux system calls
Studying a decade of Linux system calls
 
Unit 1 ppt
Unit 1 pptUnit 1 ppt
Unit 1 ppt
 
Creating templates
Creating templatesCreating templates
Creating templates
 

Andere mochten auch

Authentication Modules For Linux - PAM Architecture
Authentication Modules For Linux - PAM ArchitectureAuthentication Modules For Linux - PAM Architecture
Authentication Modules For Linux - PAM ArchitecturePriyank Kapadia
 
How to get started with the Pluggable Authentication System
How to get started with the Pluggable Authentication SystemHow to get started with the Pluggable Authentication System
How to get started with the Pluggable Authentication SystemMatt Hamilton
 
Controller encryption using RSA public-key encryption scheme (Asian Control C...
Controller encryption using RSA public-key encryption scheme (Asian Control C...Controller encryption using RSA public-key encryption scheme (Asian Control C...
Controller encryption using RSA public-key encryption scheme (Asian Control C...Kiminao Kogiso
 
Lecture 3b public key_encryption
Lecture 3b public key_encryptionLecture 3b public key_encryption
Lecture 3b public key_encryptionrajakhurram
 
Cryptography - RSA and ECDSA
Cryptography - RSA and ECDSACryptography - RSA and ECDSA
Cryptography - RSA and ECDSAAPNIC
 
Ch12 Encryption
Ch12 EncryptionCh12 Encryption
Ch12 Encryptionphanleson
 
Public Key Cryptography and RSA algorithm
Public Key Cryptography and RSA algorithmPublic Key Cryptography and RSA algorithm
Public Key Cryptography and RSA algorithmIndra97065
 
PUBLIC KEY ENCRYPTION
PUBLIC KEY ENCRYPTIONPUBLIC KEY ENCRYPTION
PUBLIC KEY ENCRYPTIONraf_slide
 
Public key cryptography and RSA
Public key cryptography and RSAPublic key cryptography and RSA
Public key cryptography and RSAShafaan Khaliq Bhatti
 

Andere mochten auch (9)

Authentication Modules For Linux - PAM Architecture
Authentication Modules For Linux - PAM ArchitectureAuthentication Modules For Linux - PAM Architecture
Authentication Modules For Linux - PAM Architecture
 
How to get started with the Pluggable Authentication System
How to get started with the Pluggable Authentication SystemHow to get started with the Pluggable Authentication System
How to get started with the Pluggable Authentication System
 
Controller encryption using RSA public-key encryption scheme (Asian Control C...
Controller encryption using RSA public-key encryption scheme (Asian Control C...Controller encryption using RSA public-key encryption scheme (Asian Control C...
Controller encryption using RSA public-key encryption scheme (Asian Control C...
 
Lecture 3b public key_encryption
Lecture 3b public key_encryptionLecture 3b public key_encryption
Lecture 3b public key_encryption
 
Cryptography - RSA and ECDSA
Cryptography - RSA and ECDSACryptography - RSA and ECDSA
Cryptography - RSA and ECDSA
 
Ch12 Encryption
Ch12 EncryptionCh12 Encryption
Ch12 Encryption
 
Public Key Cryptography and RSA algorithm
Public Key Cryptography and RSA algorithmPublic Key Cryptography and RSA algorithm
Public Key Cryptography and RSA algorithm
 
PUBLIC KEY ENCRYPTION
PUBLIC KEY ENCRYPTIONPUBLIC KEY ENCRYPTION
PUBLIC KEY ENCRYPTION
 
Public key cryptography and RSA
Public key cryptography and RSAPublic key cryptography and RSA
Public key cryptography and RSA
 

Ähnlich wie Pluggable Authentication Module

Pamsession
PamsessionPamsession
Pamsessionguest648519
 
Using filesystem capabilities with rsync
Using filesystem capabilities with rsyncUsing filesystem capabilities with rsync
Using filesystem capabilities with rsyncHazel Smith
 
Wissbi osdc pdf
Wissbi osdc pdfWissbi osdc pdf
Wissbi osdc pdfChris Huang
 
Distributed operating system amoeba case study
Distributed operating system  amoeba case studyDistributed operating system  amoeba case study
Distributed operating system amoeba case studyRamuAryan
 
Tutorial on Parallel Computing and Message Passing Model - C2
Tutorial on Parallel Computing and Message Passing Model - C2Tutorial on Parallel Computing and Message Passing Model - C2
Tutorial on Parallel Computing and Message Passing Model - C2Marcirio Chaves
 
Using puppet
Using puppetUsing puppet
Using puppetAlex Su
 
VMware App Volumes Troubleshooting
VMware App Volumes TroubleshootingVMware App Volumes Troubleshooting
VMware App Volumes TroubleshootingDenis Gundarev
 
AtoM's Command Line Tasks - An Introduction
AtoM's Command Line Tasks - An IntroductionAtoM's Command Line Tasks - An Introduction
AtoM's Command Line Tasks - An IntroductionArtefactual Systems - AtoM
 
Ansible automation tool with modules
Ansible automation tool with modulesAnsible automation tool with modules
Ansible automation tool with modulesmohamedmoharam
 
Install websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bitsInstall websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bitsManuel Vega
 
SAP LVM Customer Instances
SAP LVM Customer InstancesSAP LVM Customer Instances
SAP LVM Customer InstancesGary Jackson MBCS
 
SAP LVM Custom Instances
SAP LVM Custom InstancesSAP LVM Custom Instances
SAP LVM Custom InstancesAliter Consulting
 
connmove - Software for SAP and Microsoft
connmove - Software for SAP and Microsoftconnmove - Software for SAP and Microsoft
connmove - Software for SAP and Microsoftconnmove
 
Presentation aix workload partitions (wpa rs)
Presentation   aix workload partitions (wpa rs)Presentation   aix workload partitions (wpa rs)
Presentation aix workload partitions (wpa rs)xKinAnx
 
Plugins And Making Your Own
Plugins And Making Your OwnPlugins And Making Your Own
Plugins And Making Your OwnLambert Beekhuis
 
Oracle applications 11i dba faq
Oracle applications 11i dba faqOracle applications 11i dba faq
Oracle applications 11i dba faqirshadulla kayamkhani
 
How to Configure the CA Workload Automation System Agent agentparm.txt File
How to Configure the CA Workload Automation System Agent agentparm.txt FileHow to Configure the CA Workload Automation System Agent agentparm.txt File
How to Configure the CA Workload Automation System Agent agentparm.txt FileCA Technologies
 
Piattaforma Web Linux completa dai sorgenti
Piattaforma Web Linux completa dai sorgentiPiattaforma Web Linux completa dai sorgenti
Piattaforma Web Linux completa dai sorgentiGiulio Destri
 
Information on Tomcat in cPanel & WHM
Information on Tomcat in cPanel & WHMInformation on Tomcat in cPanel & WHM
Information on Tomcat in cPanel & WHMHTS Hosting
 
Automation using ibm rft
Automation using ibm rftAutomation using ibm rft
Automation using ibm rftPrashant Chaudhary
 

Ähnlich wie Pluggable Authentication Module (20)

Pamsession
PamsessionPamsession
Pamsession
 
Using filesystem capabilities with rsync
Using filesystem capabilities with rsyncUsing filesystem capabilities with rsync
Using filesystem capabilities with rsync
 
Wissbi osdc pdf
Wissbi osdc pdfWissbi osdc pdf
Wissbi osdc pdf
 
Distributed operating system amoeba case study
Distributed operating system  amoeba case studyDistributed operating system  amoeba case study
Distributed operating system amoeba case study
 
Tutorial on Parallel Computing and Message Passing Model - C2
Tutorial on Parallel Computing and Message Passing Model - C2Tutorial on Parallel Computing and Message Passing Model - C2
Tutorial on Parallel Computing and Message Passing Model - C2
 
Using puppet
Using puppetUsing puppet
Using puppet
 
VMware App Volumes Troubleshooting
VMware App Volumes TroubleshootingVMware App Volumes Troubleshooting
VMware App Volumes Troubleshooting
 
AtoM's Command Line Tasks - An Introduction
AtoM's Command Line Tasks - An IntroductionAtoM's Command Line Tasks - An Introduction
AtoM's Command Line Tasks - An Introduction
 
Ansible automation tool with modules
Ansible automation tool with modulesAnsible automation tool with modules
Ansible automation tool with modules
 
Install websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bitsInstall websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bits
 
SAP LVM Customer Instances
SAP LVM Customer InstancesSAP LVM Customer Instances
SAP LVM Customer Instances
 
SAP LVM Custom Instances
SAP LVM Custom InstancesSAP LVM Custom Instances
SAP LVM Custom Instances
 
connmove - Software for SAP and Microsoft
connmove - Software for SAP and Microsoftconnmove - Software for SAP and Microsoft
connmove - Software for SAP and Microsoft
 
Presentation aix workload partitions (wpa rs)
Presentation   aix workload partitions (wpa rs)Presentation   aix workload partitions (wpa rs)
Presentation aix workload partitions (wpa rs)
 
Plugins And Making Your Own
Plugins And Making Your OwnPlugins And Making Your Own
Plugins And Making Your Own
 
Oracle applications 11i dba faq
Oracle applications 11i dba faqOracle applications 11i dba faq
Oracle applications 11i dba faq
 
How to Configure the CA Workload Automation System Agent agentparm.txt File
How to Configure the CA Workload Automation System Agent agentparm.txt FileHow to Configure the CA Workload Automation System Agent agentparm.txt File
How to Configure the CA Workload Automation System Agent agentparm.txt File
 
Piattaforma Web Linux completa dai sorgenti
Piattaforma Web Linux completa dai sorgentiPiattaforma Web Linux completa dai sorgenti
Piattaforma Web Linux completa dai sorgenti
 
Information on Tomcat in cPanel & WHM
Information on Tomcat in cPanel & WHMInformation on Tomcat in cPanel & WHM
Information on Tomcat in cPanel & WHM
 
Automation using ibm rft
Automation using ibm rftAutomation using ibm rft
Automation using ibm rft
 

Mehr von SinarShebl

Introduction To Erlang Final
Introduction To Erlang   FinalIntroduction To Erlang   Final
Introduction To Erlang FinalSinarShebl
 
Scmp P & F
Scmp P & FScmp P & F
Scmp P & FSinarShebl
 
Java Script Utilities
Java Script UtilitiesJava Script Utilities
Java Script UtilitiesSinarShebl
 
All Bow To Open Solaris Crossbow H4ck3rz Due
All Bow To Open Solaris Crossbow H4ck3rz DueAll Bow To Open Solaris Crossbow H4ck3rz Due
All Bow To Open Solaris Crossbow H4ck3rz DueSinarShebl
 
Fedora 11 Features and Installation
Fedora 11 Features and InstallationFedora 11 Features and Installation
Fedora 11 Features and InstallationSinarShebl
 
Google Docs
Google DocsGoogle Docs
Google DocsSinarShebl
 

Mehr von SinarShebl (8)

Infosec
InfosecInfosec
Infosec
 
Introduction To Erlang Final
Introduction To Erlang   FinalIntroduction To Erlang   Final
Introduction To Erlang Final
 
Cloud
CloudCloud
Cloud
 
Scmp P & F
Scmp P & FScmp P & F
Scmp P & F
 
Java Script Utilities
Java Script UtilitiesJava Script Utilities
Java Script Utilities
 
All Bow To Open Solaris Crossbow H4ck3rz Due
All Bow To Open Solaris Crossbow H4ck3rz DueAll Bow To Open Solaris Crossbow H4ck3rz Due
All Bow To Open Solaris Crossbow H4ck3rz Due
 
Fedora 11 Features and Installation
Fedora 11 Features and InstallationFedora 11 Features and Installation
Fedora 11 Features and Installation
 
Google Docs
Google DocsGoogle Docs
Google Docs
 

KĂŒrzlich hochgeladen

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vĂĄzquez
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Navi Mumbai Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelDeepika Singh
 

KĂŒrzlich hochgeladen (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Navi Mumbai Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 

Pluggable Authentication Module

  • 2. The Authentication Problem – Traditionally, UNIX authentication is done by comparing the (encrypted) password for users in the password file /etc/shadow. – Each program that requires authentication implements its own authentication mechanisms. – Authentication mechanism becomes more visible when you add various applications that are doing some sort of authentication. – Like: Logging from a graphical user interface using display managers. – Services like : FTP, TELNET, IMAP, SSH. – As a system administrator you will end up spending a lot of time maintaining many user database besides /etc/passwd.
  • 3. Need for PAM – With PAM, the system administrator can use the same user database for every login process of your system. – It is possible to use more than one underlying authentication mechanisms (back end) controlled by PAM and transparent to the users. – PAM-aware applications will not break if the system administrator changes the underlying authentication configuration. – Using PAM for authentication requires much less programming than developing a complete set of authentication functions.
  • 4. History of PAM – In 1995, developers from Sun Microsystems implement a generic framework for Solaris. – In Aug 1997, when Solairs 2.6 was released PAM was an integrated component of the operating system. – In Feb 1997, the Linux-PAM project began – Now most GNU/Linux distributions today are using PAM. 4
  • 5. Theory of Operation – The theory of operations is independent of the operating system and PAM implementation. – In order to configure PAM successfully, you need to have all the components working together correctly. – PAM framework is complex and not forgiving when it comes to errors.
  • 6. PAM File System Layout / lib libpam.so.0 security pam_unix.so pam_deny.so etc pam.conf pam.d login ssh other security access.conf usr pam_mount.conf include security pam_modules.h pam_appl.h pam_misc.h
  • 7. PAM File System Layout (Cont.) – The PAM-aware applications are linked against the PAM library, which located in /lib/ directory with the name libpam-X.so.0 – Configuration of PAM can be done in two ways ‱ Put everything in one single file /etc/pam.conf ‱ Or split the configuration by service in the directory /etc/pam.d – Some PAM modules required configurations files beside the PAM configuration to operate.
  • 8. PAM Framework – PAM relies on dynamically loaded modules. – A module can provide mechanisms to authenticate user information stored in a particular back end. – A PAM service module is a shared library that provides authentication and other security services to applications such as login, or telnet. – The four types of PAM services are: ‱ Authentication service modules. ‱ Account management modules. ‱ Session management modules. ‱ Password management modules.
  • 9. PAM Framework (Cont.) Application PAM Services Modules Login PAM PAM Lib API /lib/libpam.so Telnet pam_ pam_ pam_ unix.so ldap.so mount.so Pam. pam.d conf Other /etc/ Appl security/ /etc/ LDAP pam_ passwd server mount. conf
  • 10. Management Groups – Each Service can use PAM in four different stages of the Authentication process. – These stages are called management groups. – A module provides the functionality for one or more management Groups. – You can think about it as a different module for each group.
  • 11. Management Groups (Cont.) The Auth Group – Provides two functions: ‱ First the user can be validated ‱ Second, credentials are granted by the auth management group
  • 12. Management Groups (Cont.) The Account Group – The access to a service is controlled by the account management group. – You might only be allowed to use a service ‱ A number of times per week. ‱ In certain periods of the day. ‱ Or, if your account is not yet expired.
  • 13. Management Groups (Cont.) The Session Group – The environment for a given service is built up by the session management group. – When you stop using a service , the session groups tears down the environment. – When creating the environment the data required for proper operation will be loaded.
  • 14. Management Groups (Cont.) The Password Group – It is only used when a user wishes to update the password. – With PAM you separate passwords changing applications from the back-end storage.
  • 15. Stacking – For each management groups you can define a set or a stack of modules, which are used in turn. – The order of calling is determined by the order in the configuration (service) file. – Changing the order in the stack might have great impact on the functionality. auth [success=1 default=ignore] pam_unix.so nullok_secure auth [success=1 default=ignore] pam_unix.so nullok_secure auth required pam_permit.so
  • 16. Control Flags – A module can either return success or failure. – Some answers are more important than others. – The control flags can change the flow and how decisions are made.
  • 17. Control Flags (Cont.) Requisite – If is the strongest of the flags. – If a module is flagged as requisite, and it fails, PAM will return to the calling applications instantly and report the failure.
  • 18. Control Flags (Cont.) Required – The return code for a required module is stored. – In the case of failure, execution is not stopped but continues to the next module. – When the stack of modules has been executed, and at least one required module has failed, PAM will return failure to the calling application.
  • 19. Control Flags (Cont.) Sufficient – A sufficient module can actually be quite strong. – The processing of the stack is stopped if a sufficient module returns OK, if no previous required module has failed. – If there are required modules after the sufficient modules, these modules are not called.
  • 20. Control Flags (Cont.) Optional – A failure does not alter the execution of the stack as in the case of the requisite flag. – The return code is ignored, and neither failure nor success is taken into account
  • 21. Developing with PAM PAM Application Application PAM runtime Module pam_start Data structure initialized pam_handle Checking user pam_auth pam_unix Conversation function pam_end Data structure destroyed time
  • 22. References – The Definitive Guide to PAM for Linux SysAdmins and C Developers. – The Linux-PAM Guides http://www.kernel.org/pub/linux/libs/pam/ – Linux CBT PAM. – PAM manual pages.
  • 23. Session End Thank You Ahmed Madkour ahm.madkour@gmail.com