Polkit-0.119
      
      
      
        
          Installation of Polkit
        
        
          There should be a dedicated user and group to take control of the
          polkitd daemon after
          it is started. Issue the following commands as the root user:
        
        groupadd -fg 27 polkitd &&
useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
        -g polkitd -s /bin/false polkitd
        
          Fix an issue introduced in recent Polkit releases with elogind:
        
        patch -Np1 -i ../polkit-0.119-fix_elogind_detection-1.patch &&
autoreconf -fv
        
          Install Polkit by running the
          following commands:
        
        ./configure --prefix=/usr        \
            --sysconfdir=/etc    \
            --localstatedir=/var \
            --disable-static     \
            --with-os-type=LFS   \
            --disable-libsystemd-login &&
make
        
          To test the results, first ensure that the system D-Bus daemon is running. Then run make check.
        
        
          Now, as the root user:
        
        make install
       
      
        
          Command Explanations
        
        
          --disable-libsystemd-login:
          This switch forces polkit to build with elogind support (if
          available) rather than systemd-logind.
        
        
          --disable-static: This
          switch prevents installation of static versions of the libraries.
        
        
          --with-authfw=shadow: This switch
          enables the package to use the Shadow rather than the Linux PAM Authentication framework. Use it if
          you have not installed Linux PAM.
        
        
          --enable-gtk-doc: Use this parameter if
          GTK-Doc is installed and you wish
          to rebuild and install the API documentation.
        
       
      
        
          Configuring Polkit
        
        
          
          
            PAM
            Configuration
          
          
            ![[Note]](../images/note.png) 
            
              Note
            
            
              If you did not build Polkit
              with Linux PAM support, you
              can skip this section.
            
           
          
            If you have built Polkit with
            Linux PAM support, you need to
            modify the default PAM configuration file which was installed by
            default to get Polkit to work
            correctly with BLFS. Issue the following commands as the
            root user to create the
            configuration file for Linux
            PAM:
          
          cat > /etc/pam.d/polkit-1 << "EOF"
# Begin /etc/pam.d/polkit-1
auth     include        system-auth
account  include        system-account
password include        system-password
session  include        system-session
# End /etc/pam.d/polkit-1
EOF
         
       
      
        
          Contents
        
        
          
            
              Installed Programs:
              pkaction, pkcheck, pk-example-frobnicate,
              pkexec, pkttyagent and polkitd
            
            
              Installed Libraries:
              libpolkit-agent-1.so and
              libpolkit-gobject-1.so
            
            
              Installed Directories:
              /etc/polkit-1, /usr/include/polkit-1,
              /usr/lib/polkit-1, /usr/share/gtk-doc/html/polkit-1 and
              /usr/share/polkit-1
            
           
         
        
          
            Short Descriptions
          
          
            
              
              
            
            
              
                | 
                    pkaction
                   | 
                    is used to obtain information about registered PolicyKit
                    actions
                   | 
              
                | 
                    pkcheck
                   | 
                    is used to check whether a process is authorized for
                    action
                   | 
              
                | 
                    pk-example-frobnicate
                   | 
                    is an example program to test the pkexec command
                   | 
              
                | 
                    pkexec
                   | 
                    allows an authorized user to execute a command as another
                    user
                   | 
              
                | 
                    pkttyagent
                   | 
                    is used to start a textual authentication agent for the
                    subject
                   | 
              
                | 
                    polkitd
                   | 
                    provides the org.freedesktop.PolicyKit1 D-Bus service on the system message
                    bus
                   | 
              
                | 
                    libpolkit-agent-1.so | 
                    contains the Polkit
                    authentication agent API functions
                   | 
              
                | 
                    libpolkit-gobject-1.so | 
                    contains the Polkit
                    authorization API functions
                   | 
            
          
         
       
      
        Last updated on