Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


View this topic in a long page with up to 500 replies per page Create new topic
1 | 2 
kelirkenan
4 posts

Wannabe Geek
Inactive user


  #2365242 2-Dec-2019 23:13
Send private message

Hi, there!

 

Sorry for the late reply. I've been out of the office all last week. I'm posting my configuration LocalSettings.php. I have edited it for privacy reasons, but I think you'll get the point quickly by taking a look at it. You will note that OU, CN and other words appear there sometimes in capital letters or not. I believe that is unrelevant for your config to work as expected. What you have to make sure about is that the names your LDAP/AD entries match the ones of your config. Let's say you have a group in your LDAP called Users, then write Users in your config. Check out the groupsync and authorization parameters. I think they're related and must be both declared in order to make Authorization work properly.

 

# End of automatically generated settings.
# Add more configuration options below.

 

# LDAP
wfLoadExtensions( [
        'PluggableAuth',
        'LDAPProvider',
        'LDAPAuthentication2',
        'LDAPAuthorization',
        'Auth_remoteuser',
        'LDAPGroups'
] );

 

# I DON'T KNOW WHAT THIS DOES, BUT I THINK IT IS NEEDED ;-)
$wgAuthRemoteuserUserNameReplaceFilter = [
    '@DOMAIN.MY$' => '' // mod_krb5 and .htaccess
];

 

$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['autocreateaccount'] = true;

 

$LDAPAuthentication2UsernameNormalizer = 'strtolower';
$LDAPAuthentication2AllowLocalLogin = true;

 

$LDAPProviderDomainConfigProvider = function() {
        $config = [
                'mydomain' => [
                        'connection' => [
                                "server" => "your_server_IP_or_dns_name_without_http_https_or_whatever",
                                "user" => "CN=XXXXXX,OU=Users,OU=XXXXXX,DC=XXXXXX,",
                                "pass" => 'XXXXXXXXXXXXXXXXXXXXXX',
                                "port" => Better to use 389 to avoid SSL problems just for testing, then use 636,
                                "enctype" => 'ssl',
                                "options" => [
                                        "LDAP_OPT_DEREF" => 1
                                ],
                                "basedn" => "ou=XXXXXX,dc=XXXXXX",
                                "groupbasedn" => "ou=Groups,ou=XXXXXXXX,ou=XXXXXXXXXXX",
                                "userbasedn" => "ou=XXXXXXXXXX,dc=XXXXXXXXX",
                                "searchattribute" => "samaccountname",
                                "usernameattribute" => "samaccountname",
                                "realnameattribute" => "cn",
                                "emailattribute" => "mail",
                                "grouprequest" => "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\GroupMember::factory"
                        ],
                        'groupsync' =>
                        [
                                "mechanism" => "mappedgroups",
                                "mapping" =>
                                [
                                        "read" => "cn=XXXXXXXXXXXXXXX,ou=XXXXXXXXXXXXXXX,ou=XXXXXXXXXXXXXXX",
                                        "write" => "cn=XXXXXXXXXXXXXXX,ou=XXXXXXXXXXXXXXX,ou=XXXXXXXXXXXXXXX"
                                ]
                        ],
                        'authorization' =>
                        [
                                "rules" =>
                                [
                                        "groups" =>
                                        [
                                                "required" =>
                                                [
                                                        "cn=XXXXXXXXXXXXXXX,ou=XXXXXXXXXXXXXXX,ou=XXXXXXXXXXXXXXX"
                                                ]
                                        ]
                                ]
                        ],
                        'userinfo' => [
                                "attributes-map" => [
                                        "realname" => "cn"
                                ]
                        ]
                ]
        ];

 

        return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );
};

 

# This will show errors in your browser if there are any of them (like a --verbose option I think). Remove it in production or set it to false
$wgShowExceptionDetails = true;




awliste
2 posts

Wannabe Geek


  #2383565 1-Jan-2020 05:58
Send private message

Apologies for the late response. Been OOO myself, and then consumed with end of year patches/updates/disruptive maintenance. 

 

Very much appreciate this posting. Thank you. You've helped me resolve some of my syntax errors and get my group syncs working. Thank you so much!

 

 

 

R/,

 

 - A


1 | 2 
View this topic in a long page with up to 500 replies per page Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.