Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
Your browser does not support iframes.

Description / Features

The Sonar PAM Plugin This plugin enables the delegation of Sonar authentication SonarQube authentication to underlying PAM subsystem. The plugin works on *nix box boxes with the Pluggable Authentication Module (PAM).

Only password-checking is done against PAM. Authorization (access control) is still fully managed in Sonar. A Sonar account must be created first for each new user wishing to use Sonar. The Sonar administrator should also SonarQube. During the first authentication trial, if the password is correct, the SonarQube database is automatically populated with the new user.  The System administrator should assign the user to the desired groups in order to grant him necessary rights. If a password exists , the password in the Sonar account SonarQube database, it will be ignored as because the external system password will override it.



OS and Architecture


Linux AMD64


Linux i386




Solaris sparc


Windows all flavours



Usage & Installation

  1. Install jpam
    1. Download jpam for your system from here
    2. Alternatively:
      1. Copy the jpam's native library following these directions
      2. Copy the jpam's native libray in sonar/bin/<your arch>/lib
  2. Install Sonar PAM pluginPlace the jar plugin into the through the Update Center or download it into the SONARQUBE_HOME/extensions/plugins directory directory
  3. Make sure that at least one user with global administration role exists in Sonar SonarQube as well as in the external system
  4. Configure

    Update the SONARQUBE_HOME/conf/ file by adding

    and editing

    the following lines:

    Code Block
    #---------------------- # Sonar PAM Auth Plugin #---------------------- PAM
    # Automatically create users
    (available since Sonar 2
    # When set to true, user will be created after successful authentication, if doesn't exists.
    # The default group affected to new users can be defined online, in 
    SonarQube general settings. The default value is "sonar-users".
    # Default is false.
    sonar.authenticator.createUsers: true
  5. Restart Sonar SonarQube and check logs for:

    Code Block
    2012.11.24 20:32:34 INFO  org.sonar.INFO  Security realm: PAM
    2012.11.24 20:32:34 INFO  org.sonar.INFO  Security realm started
  6. Log in to SonarSonarQube

Include Page
Include - Technical Users
Include - Technical Users

Known Issues

Crash using PAM winbind authentication (

In case of an unsucessful login for wrong a bad password /or a locked out account (wrong a bad username does not produce the same issue) you may get this kind of error while using pam winbind authentication:

Code Block
borderStyledashed error
INFO   | jvm 1    | 2011/03/18 10:06:10 | *** glibc detected *** java: free(): invalid pointer: 0x00002aaadc000168 ***
INFO   | jvm 1    | 2011/03/18 10:06:10 | ======= Backtrace: =========
INFO   | jvm 1    | 2011/03/18 10:06:10 | /lib64/[0x3b9527245f]
INFO   | jvm 1    | 2011/03/18 10:06:10 | /lib64/[0x3b952728bb]
INFO   | jvm 1    | 2011/03/18 10:06:10 | /lib64/security/[0x2aaadaddc8f9]
INFO   | jvm 1    | 2011/03/18 10:06:10 | /lib64/security/[0x2aaadaddee4c]
INFO   | jvm 1    | 2011/03/18 10:06:10 | /lib64/security/[0x2aaadaddf9e4]
INFO   | jvm 1    | 2011/03/18 10:06:10 | /lib64/[0x3b97e02dc7]
INFO   | jvm 1    | 2011/03/18 10:06:10 | /lib64/[0x3b97e026d2]

In this case Sonar SonarQube crashes and restart restarts automatically.

As far as I understand it's It appears to be a issue. I've found this workaroundThis workaround is available:

  1. Edit /etc/security/pam_winbind.conf:
  2. Set Kerberos authentication:

    Code Block
    # pam_winbind configuration file
    # /etc/security/pam_winbind.conf
    # turn on debugging
    #debug = yes
    # request a cached login if possible
    # (needs "winbind offline logon = yes" in smb.conf)
    cached_login = yes
    # authenticate using kerberos
    krb5_auth = yes
    # when using kerberos, request a "FILE" krb5 credential cache type
    # (leave empty to just do krb5 authentication but not have a ticket
    # afterwards)
    ;krb5_ccache_type = FILE
    # make successful authentication dependend on membership of one SID
    # (can also take a name)
    ;require_membership_of =

Change Log

JIRA Issues
titleRelease 0.2


JIRA Issues
titleRelease 0.1