Extension talk:ConfirmAccount

Jump to navigation Jump to search

About this board


Waanders (talkcontribs)
Reply to "$wgConfirmAccountCaptchas"
Wmat (talkcontribs)

I have an account request that was rejected in error. Can it be unrejected? I asked the User to request a new account but they're receiving a message that the Username is already taken and if they try a new username, they get a message that the email address is already taken.

Reply to "Unreject an account request"

Auto-creation of a local account failed: You have not specified a valid username

31
213.55.220.217 (talkcontribs)

Hello Together

We have updated the mediawiki in our company from version 1.23.15 to version 1.27 and then to 1.34.

After we changed the login to LDAPAuthentication2 we could log in. Now we have the following problems:

1. the matching between "User" ==> "Groups" does not work correctly

2. new users can no longer register.

Below I have our LocalSettings.php, the error message when logging in is the following:

"Auto-creation of a local account failed: You have not specified a valid username"

Side note:

We want the login with the e-mail address firstname.lastname@domain

Sometime users could log in, but then the correct value was not entered into the database (Firstname Lastname) instead of (firstname.lastname@domain)

Has anyone an idea what we did wrong?

$wgDebugLogFile = '/var/www/html/wiki/debug_log.log';

$wgShowExceptionDetails;

$wgDebugToolbar;

$wgDebugLogGroups['LDAPGrops'] = '/var/www/html/wiki/LDAPGroups.log';

error_reporting( -1 );

ini_set( 'display_errors', 1 );

ini_set( 'display_startup_errors', 1 );

$wgDebugLogGroups['LDAPAuthentication2'] = "/var/www/html/wiki/LDAPAuthentication2.log";

  wfLoadExtension( 'WikiEditor' );

  wfLoadExtension( 'PluggableAuth' );

  wfLoadExtension( 'LDAPProvider' );

  wfLoadExtension( 'LDAPAuthentication2' );

  wfLoadExtension( 'LDAPAuthorization' );

  wfLoadExtension( 'LDAPUserInfo' );

  wfLoadExtension( 'LDAPGroups' );


$wgEmailConfirmToEdit = false;

$wgGroupPermissions['*']['edit'] = false;

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

$wgBlockDisablesLogin = true;

$LDAPAuthorizationAutoAuthRemoteUserStringParser = 'ldapuser@some.domain';

$LDAPAuthentication2AllowLocalLogin = true;

$wgAuthRemoteUserAllowUserSwitch = true;

$wgPluggableAuth_ButtonLabel = "Log In";

$LDAPProviderDomainConfigProvider = function(){

       $config = [

               'some.domain' => [

                       'connection' => [

                               "server" => "ADServer.some.domain",

               "user" => "ldapuser@some.domain",

               "pass" => "LDAPPasswd",

               "port" => "636",

               "enctype" => "ssl",

               "options" => [

                                       "LDAP_OPT_DEREF" => 1

                               ],

                               "basedn" => "dc=some,dc=domain",

                               "groupbasedn" => "dc=some,dc=domain",

                               "userbasedn" => "dc=some,dc=domain",

                               "searchattribute" => "userprincipalname",

                               "searchstring" => "",

                               "realnameattribute" => "cn",

                               "usernameattribute" => "userprincipalname",

                               "emailattribute" => "mail",

                               "grouprequest" => "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\GroupMember::factory"

                       ],

           "authorization" =>

           [

               "rules" =>

               [

                   "required" =>

                   [

                           "wiki-admin",

                           "wiki-user"

                   ]

               ]

           ],

           "userinfo" =>

           [

               "attributes-map" =>

               [

                   "email" => "mail",

                   "realname" => "userprincipalname"

               ]

           ],

           "groupsync" => 

           [

               "mechanism" => "mappedgroups",

               "mapping" =>

               [

                   "sysop" =>  "wiki-admin",

                   "user" =>  "wiki-user" 

               ]

           ]  

       ]

   ];

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

};

Best regards

Scoobydoo321 (talkcontribs)

@Osnard

sorry i first wrote this Topic (as 213.55.220.217) and after that i created a login.

i found out, that the login with an email address is not supported. and now i've tried to change the login with other AD Credentials.

But now i can't login in the log i see that the user is authenticated but after that the autocreate user account wants to create an user with the ip as username.

have anyone an idea, where i have the failure?

i now use a file for the connection (ldap.json).


Best regards

Osnard (talkcontribs)

This is probably because the "authorization" part fails. The values "wiki-admin" and "wiki-user" in "authorization.rules.required.groups" should be DNs, like "CN=wiki-admin,OU=Groups,OU=Company,...". Check the output of "extensions/LDAPProvider/maintenance/ShowUserGroups.php" to see what you need to put in there. For testing you can also make "authorization.rules.required.groups" empty.

Scoobydoo321 (talkcontribs)

Hi Osnard

Thanks for the reply. I checked the output, i got some Full DNs and Short names. I copied the output from the ShowUserGroup.php but it still doesen't work.

Sorry but im new in json, so i hope this one is correct when you mean empty:

{

   "my.domain": {

       "connection": {

           "server": "ADServer.my.domain",

           "port": "636",

           "user": "CN=ldapuser,OU=ServiceAccounts,DC=domain,DC=my",

           "pass": "somePassword",

           "enctype": "ssl",

           "options": {

               "LDAP_OPT_DEREF": "1"

           },

           "basedn": "dc.domain,dc=my",

           "groupbasedn": "dc.domain,dc=my",

           "userbasedn": "dc.domain,dc=my",

           "searchattribute": "userprincipalname",

           "usernameattribute": "samaccountname",

           "realnameattribute": "cn",

           "emailattribute": "mail",

           "grouprequest": "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::factory"

       },

       "userinfo": {

           "attributes-map": {

               "email": "mail",

               "realname": "cn"

           }

       },

       "authorization": {

           "rules": {

               "required": {

                   "groups": []

               }

           }

       },

       "groupsync": {

           "mapping": {

               "sysop": "CN=WikiAdmin,OU=Groups,DC=domain,DC=my",

               "user": "CN=WikiUser,OU=Groups,DC=domain,DC=my",

           }

       }

   }

}
Osnard (talkcontribs)
Scoobydoo321 (talkcontribs)

Yes the "CheckLogin.php" returns OK


Output from ldap.log whit disabled LDAPAuthorization

2020-07-22 09:15:08 srv-wiki-1 wiki_db: In execute()
2020-07-22 09:15:08 srv-wiki-1 wiki_db: Getting PluggableAuth singleton
2020-07-22 09:15:08 srv-wiki-1 wiki_db: Class name: MediaWiki\Extension\LDAPAuthentication2\PluggableAuth
2020-07-22 09:15:08 srv-wiki-1 wiki_db: ldap_connect( $hostname = 'ldaps://ADServer.my.domain:636', $port = 389 );
2020-07-22 09:15:08 srv-wiki-1 wiki_db: # __METHOD__ returns Resource id #259
2020-07-22 09:15:08 srv-wiki-1 wiki_db: Setting LDAP_OPT_PROTOCOL_VERSION to 3
2020-07-22 09:15:08 srv-wiki-1 wiki_db: ldap_set_option( $linkID, $option = 17, $newval = 3 );
2020-07-22 09:15:08 srv-wiki-1 wiki_db: # returns 1
2020-07-22 09:15:08 srv-wiki-1 wiki_db: Setting LDAP_OPT_REFERRALS to 0
2020-07-22 09:15:08 srv-wiki-1 wiki_db: ldap_set_option( $linkID, $option = 8, $newval = 0 );
2020-07-22 09:15:08 srv-wiki-1 wiki_db: # returns 1
2020-07-22 09:15:08 srv-wiki-1 wiki_db: Setting LDAP_OPT_DEREF to 1
2020-07-22 09:15:08 srv-wiki-1 wiki_db: ldap_set_option( $linkID, $option = 2, $newval = 1 );
2020-07-22 09:15:08 srv-wiki-1 wiki_db: # returns 1
2020-07-22 09:15:08 srv-wiki-1 wiki_db: ldap_bind( $linkID, $bindRDN = 'CN=ldapuser,OU=ServiceAccounts,OU=someOU,DC=my,DC=domain', $bindPassword = 'XXXX' );
2020-07-22 09:15:08 srv-wiki-1 wiki_db: # returns 1
2020-07-22 09:15:08 srv-wiki-1 wiki_db: MediaWiki\Extension\LDAPProvider\Client::getUserDN: search with array (
  'base' => 'DC=my,DC=domain',
  'filter' => '(userprincipalname=fred@my.domain)',
  'attributes' => 
  array (
    0 => '*',
    1 => 'memberof',
  ),
)
2020-07-22 09:15:08 srv-wiki-1 wiki_db: ldap_search( $linkID, $baseDN = 'DC=my,DC=domain', $filter = '(userprincipalname=fred@my.domain)', $attributes = [ '*', 'memberof' ], $attrsonly = , $sizelimit = , $timelimit = , $deref =  );
2020-07-22 09:15:08 srv-wiki-1 wiki_db: # returns Resource id #275
2020-07-22 09:15:08 srv-wiki-1 wiki_db: ldap_count_entries( $linkiID, $result = 'Resource id #275' );
2020-07-22 09:15:08 srv-wiki-1 wiki_db: # returns 1
2020-07-22 09:15:08 srv-wiki-1 wiki_db: ldap_get_entries( $linkID, $resultID );
2020-07-22 09:15:08 srv-wiki-1 wiki_db: # returns: array (
  'count' => 1,
  0 => 
  array (
    'objectclass' => 
    array (
      'count' => 4,
      0 => 'top',
      1 => 'person',
      2 => 'organizationalPerson',
      3 => 'user',
    ),
    0 => 'objectclass',
    'cn' => 
    array (
      'count' => 1,
      0 => 'tester',
    ),
    1 => 'cn',
    'sn' => 
    array (
      'count' => 1,
      0 => 'tester',
    ),
    2 => 'sn',
    'description' => 
    array (
      'count' => 1,
      0 => 'Test User',
    ),
    3 => 'description',
    'telephonenumber' => 
    array (
      'count' => 1,
      0 => '4 52 41',
    ),
    4 => 'telephonenumber',
    'givenname' => 
    array (
      'count' => 1,
      0 => 'hp',
    ),
    5 => 'givenname',
    'initials' => 
    array (
      'count' => 1,
      0 => 'fred',
    ),
    6 => 'initials',
    'distinguishedname' => 
    array (
      'count' => 1,
      0 => 'CN=tester,OU=Test,OU=Users,OU=someOU,DC=my,DC=domain',
    ),
    7 => 'distinguishedname',
    'instancetype' => 
    array (
      'count' => 1,
      0 => '4',
    ),
    8 => 'instancetype',
    'whencreated' => 
    array (
      'count' => 1,
      0 => '20131218141516.0Z',
    ),
    9 => 'whencreated',
    'whenchanged' => 
    array (
      'count' => 1,
      0 => '20200716080258.0Z',
    ),
    10 => 'whenchanged',
    'displayname' => 
    array (
      'count' => 1,
      0 => 'tester',
    ),
    11 => 'displayname',
    'usncreated' => 
    array (
      'count' => 1,
      0 => '30230',
    ),
    12 => 'usncreated',
    'memberof' => 
    array (
      'count' => 10,
      0 => 'CN=WikiAdmin,OU=Application_Groups,OU=Groups,OU=someOU,DC=my,DC=domain',
      1 => '####',
      2 => '####',
      3 => '####',
      4 => '####',
      5 => 'CN=WikiUsers,OU=Application_Groups,OU=Groups,OU=someOU,DC=my,DC=domain',
      6 => '####',
      7 => '####',
      8 => '####',
      9 => '####',
    ),
    13 => 'memberof',
    'usnchanged' => 
    array (
      'count' => 1,
      0 => '3982289',
    ),
    14 => 'usnchanged',
    'proxyaddresses' => 
    array (
      'count' => 7,
      0 => 'smtp:####',
      1 => 'smtp:####',
      2 => 'smtp:####',
      3 => 'SMTP:####',
      4 => 'sip:####',
      5 => 'smtp:####',
      6 => 'smtp:####',
    ),
    15 => 'proxyaddresses',
    'homemdb' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    16 => 'homemdb',
    'mdbusedefaults' => 
    array (
      'count' => 1,
      0 => 'TRUE',
    ),
    17 => 'mdbusedefaults',
    'mailnickname' => 
    array (
      'count' => 1,
      0 => 'fred',
    ),
    18 => 'mailnickname',
    'name' => 
    array (
      'count' => 1,
      0 => 'tester',
    ),
    19 => 'name',
    'objectguid' => 
    array (
      'count' => 1,
      0 => '<2‹.Àª	EœÌÅï��oî',
    ),
    20 => 'objectguid',
    'useraccountcontrol' => 
    array (
      'count' => 1,
      0 => '66048',
    ),
    21 => 'useraccountcontrol',
    'badpwdcount' => 
    array (
      'count' => 1,
      0 => '0',
    ),
    22 => 'badpwdcount',
    'codepage' => 
    array (
      'count' => 1,
      0 => '0',
    ),
    23 => 'codepage',
    'countrycode' => 
    array (
      'count' => 1,
      0 => '0',
    ),
    24 => 'countrycode',
    'badpasswordtime' => 
    array (
      'count' => 1,
      0 => '132397147069218117',
    ),
    25 => 'badpasswordtime',
    'lastlogoff' => 
    array (
      'count' => 1,
      0 => '0',
    ),
    26 => 'lastlogoff',
    'lastlogon' => 
    array (
      'count' => 1,
      0 => '132397149483435657',
    ),
    27 => 'lastlogon',
    'pwdlastset' => 
    array (
      'count' => 1,
      0 => '132393601472194926',
    ),
    28 => 'pwdlastset',
    'primarygroupid' => 
    array (
      'count' => 1,
      0 => '513',
    ),
    29 => 'primarygroupid',
    'profilepath' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    30 => 'profilepath',
    'objectsid' => 
    array (
      'count' => 1,
      0 => '��' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '��' . "\0" . '' . "\0" . '' . "\0" . '¶Dä#�Àê2Ûë�P}-' . "\0" . '' . "\0" . '',
    ),
    31 => 'objectsid',
    'admincount' => 
    array (
      'count' => 1,
      0 => '1',
    ),
    32 => 'admincount',
    'accountexpires' => 
    array (
      'count' => 1,
      0 => '9223372036854775807',
    ),
    33 => 'accountexpires',
    'logoncount' => 
    array (
      'count' => 1,
      0 => '0',
    ),
    34 => 'logoncount',
    'samaccountname' => 
    array (
      'count' => 1,
      0 => 'fred',
    ),
    35 => 'samaccountname',
    'samaccounttype' => 
    array (
      'count' => 1,
      0 => '805306368',
    ),
    36 => 'samaccounttype',
    'showinaddressbook' => 
    array (
      'count' => 4,
      0 => '####',
      1 => '####',
      2 => '####',
      3 => '####',
    ),
    37 => 'showinaddressbook',
    'legacyexchangedn' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    38 => 'legacyexchangedn',
    'userprincipalname' => 
    array (
      'count' => 1,
      0 => 'fred@my.domain',
    ),
    39 => 'userprincipalname',
    'lockouttime' => 
    array (
      'count' => 1,
      0 => '0',
    ),
    40 => 'lockouttime',
    'lastknownparent' => 
    array (
      'count' => 1,
      0 => 'OU=Test,OU=Users,OU=someOU,DC=my,DC=domain',
    ),
    41 => 'lastknownparent',
    'objectcategory' => 
    array (
      'count' => 1,
      0 => 'CN=Person,CN=Schema,CN=Configuration,DC=my,DC=domain',
    ),
    42 => 'objectcategory',
    'dscorepropagationdata' => 
    array (
      'count' => 1,
      0 => '16010101000000.0Z',
    ),
    43 => 'dscorepropagationdata',
    'lastlogontimestamp' => 
    array (
      'count' => 1,
      0 => '132393601780066773',
    ),
    44 => 'lastlogontimestamp',
    'msds-supportedencryptiontypes' => 
    array (
      'count' => 1,
      0 => '0',
    ),
    45 => 'msds-supportedencryptiontypes',
    'msds-lastknownrdn' => 
    array (
      'count' => 1,
      0 => 'tester',
    ),
    46 => 'msds-lastknownrdn',
    'mail' => 
    array (
      'count' => 1,
      0 => 'fred@my.domain',
    ),
    47 => 'mail',
    'thumbnailphoto' => 
    array (
      'count' => 1,
      0 => '####	
),
    48 => 'thumbnailphoto',
    'msexchhomeservername' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    49 => 'msexchhomeservername',
    'msexchmailboxsecuritydescriptor' => 
    array (
      'count' => 1,
      0 => ####
	),
    50 => 'msexchmailboxsecuritydescriptor',
    'msexchuseraccountcontrol' => 
    array (
      'count' => 1,
      0 => '0',
    ),
    51 => 'msexchuseraccountcontrol',
    'msexchmailboxguid' => 
    array (
      'count' => 1,
      0 => 'I©�„¥CJ°ùX„Nùi',
    ),
    52 => 'msexchmailboxguid',
    'msexchpoliciesincluded' => 
    array (
      'count' => 2,
      0 => '4dde4918-7608-4c22-b276-64f5eb00c3e4',
      1 => '{26491cfc-9e50-4857-861b-0cb8df22b5d7}',
    ),
    53 => 'msexchpoliciesincluded',
    'msrtcsip-internetaccessenabled' => 
    array (
      'count' => 1,
      0 => 'TRUE',
    ),
    54 => 'msrtcsip-internetaccessenabled',
    'msexchmailboxtemplatelink' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    55 => 'msexchmailboxtemplatelink',
    'msexchdelegatelistlink' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    56 => 'msexchdelegatelistlink',
    'msrtcsip-optionflags' => 
    array (
      'count' => 1,
      0 => '2305',
    ),
    57 => 'msrtcsip-optionflags',
    'msrtcsip-userpolicies' => 
    array (
      'count' => 1,
      0 => '0=666577031',
    ),
    58 => 'msrtcsip-userpolicies',
    'msexchumdtmfmap' => 
    array (
      'count' => 4,
      0 => 'reversedPhone:14254',
      1 => 'emailAddress:3733',
      2 => 'lastNameFirstName:83783747',
      3 => 'firstNameLastName:47837837',
    ),
    59 => 'msexchumdtmfmap',
    'msexchmdbrulesquota' => 
    array (
      'count' => 1,
      0 => '256',
    ),
    60 => 'msexchmdbrulesquota',
    'msexchprevioushomemdb' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    61 => 'msexchprevioushomemdb',
    'msexchrecipientdisplaytype' => 
    array (
      'count' => 1,
      0 => '1073741824',
    ),
    62 => 'msexchrecipientdisplaytype',
    'msrtcsip-primaryuseraddress' => 
    array (
      'count' => 1,
      0 => 'sip:fred@my.domain',
    ),
    63 => 'msrtcsip-primaryuseraddress',
    'msrtcsip-deploymentlocator' => 
    array (
      'count' => 1,
      0 => 'SRV:',
    ),
    64 => 'msrtcsip-deploymentlocator',
    'msexchpublicfoldermailbox' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    65 => 'msexchpublicfoldermailbox',
    'msrtcsip-userroutinggroupid' => 
    array (
      'count' => 1,
      0 => 'yôn×Ä�-_¬¤TòíÔ³�',
    ),
    66 => 'msrtcsip-userroutinggroupid',
    'msrtcsip-userenabled' => 
    array (
      'count' => 1,
      0 => 'TRUE',
    ),
    67 => 'msrtcsip-userenabled',
    'msexchelcmailboxflags' => 
    array (
      'count' => 1,
      0 => '2',
    ),
    68 => 'msexchelcmailboxflags',
    'msexchwhenmailboxcreated' => 
    array (
      'count' => 1,
      0 => '20160115162536.0Z',
    ),
    69 => 'msexchwhenmailboxcreated',
    'msexchrbacpolicylink' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    70 => 'msexchrbacpolicylink',
    'msrtcsip-primaryhomeserver' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    71 => 'msrtcsip-primaryhomeserver',
    'msexchsafesendershash' => 
    array (
      'count' => 1,
      0 => 't¨¤§',
    ),
    72 => 'msexchsafesendershash',
    'msexchversion' => 
    array (
      'count' => 1,
      0 => '88218628259840',
    ),
    73 => 'msexchversion',
    'msrtcsip-federationenabled' => 
    array (
      'count' => 1,
      0 => 'TRUE',
    ),
    74 => 'msrtcsip-federationenabled',
    'msexchrecipienttypedetails' => 
    array (
      'count' => 1,
      0 => '1',
    ),
    75 => 'msexchrecipienttypedetails',
    'count' => 76,
    'dn' => 'CN=tester,OU=Test,OU=Users,OU=someOU,DC=my,DC=domain',
  ),
)
2020-07-22 09:15:08 srv-wiki-1 wiki_db: Found user DN: 'CN=tester,OU=Test,OU=Users,OU=someOU,DC=my,DC=domain'
2020-07-22 09:15:08 srv-wiki-1 wiki_db: MediaWiki\Extension\LDAPProvider\Client::getSearchString: User DN is: 'CN=tester,OU=Test,OU=Users,OU=someOU,DC=my,DC=domain'
2020-07-22 09:15:08 srv-wiki-1 wiki_db: ldap_bind( $linkID, $bindRDN = 'CN=tester,OU=Test,OU=Users,OU=someOU,DC=my,DC=domain', $bindPassword = 'XXXX' );
2020-07-22 09:15:08 srv-wiki-1 wiki_db: # returns 1
2020-07-22 09:15:08 srv-wiki-1 wiki_db: ldap_bind( $linkID, $bindRDN = 'CN=srvwikiadauth,OU=ServiceAccounts,OU=someOU,DC=my,DC=domain', $bindPassword = 'XXXX' );
2020-07-22 09:15:08 srv-wiki-1 wiki_db: # returns 1
2020-07-22 09:15:08 srv-wiki-1 wiki_db: ldap_search( $linkID, $baseDN = 'DC=my,DC=domain', $filter = '(userprincipalname=fred@my.domain)', $attributes = [ '*', 'memberof' ], $attrsonly = , $sizelimit = , $timelimit = , $deref =  );
2020-07-22 09:15:08 srv-wiki-1 wiki_db: # returns Resource id #289
2020-07-22 09:15:08 srv-wiki-1 wiki_db: ldap_get_entries( $linkID, $resultID );
2020-07-22 09:15:08 srv-wiki-1 wiki_db: # returns: array (
  'count' => 1,
  0 => 
  array (
    'objectclass' => 
    array (
      'count' => 4,
      0 => 'top',
      1 => 'person',
      2 => 'organizationalPerson',
      3 => 'user',
    ),
    0 => 'objectclass',
    'cn' => 
    array (
      'count' => 1,
      0 => 'tester',
    ),
    1 => 'cn',
    'sn' => 
    array (
      'count' => 1,
      0 => 'tester',
    ),
    2 => 'sn',
    'description' => 
    array (
      'count' => 1,
      0 => 'Test User',
    ),
    3 => 'description',
    'telephonenumber' => 
    array (
      'count' => 1,
      0 => '4 52 41',
    ),
    4 => 'telephonenumber',
    'givenname' => 
    array (
      'count' => 1,
      0 => 'hp',
    ),
    5 => 'givenname',
    'initials' => 
    array (
      'count' => 1,
      0 => 'fred',
    ),
    6 => 'initials',
    'distinguishedname' => 
    array (
      'count' => 1,
      0 => 'CN=tester,OU=Test,OU=Users,OU=someOU,DC=my,DC=domain',
    ),
    7 => 'distinguishedname',
    'instancetype' => 
    array (
      'count' => 1,
      0 => '4',
    ),
    8 => 'instancetype',
    'whencreated' => 
    array (
      'count' => 1,
      0 => '20131218141516.0Z',
    ),
    9 => 'whencreated',
    'whenchanged' => 
    array (
      'count' => 1,
      0 => '20200716080258.0Z',
    ),
    10 => 'whenchanged',
    'displayname' => 
    array (
      'count' => 1,
      0 => 'tester',
    ),
    11 => 'displayname',
    'usncreated' => 
    array (
      'count' => 1,
      0 => '30230',
    ),
    12 => 'usncreated',
    'memberof' => 
    array (
      'count' => 10,
      0 => 'CN=WikiAdmin,OU=Application_Groups,OU=Groups,OU=someOU,DC=my,DC=domain',
      1 => '####',
      2 => '####',
      3 => '####',
      4 => '####',
      5 => 'CN=WikiUsers,OU=Application_Groups,OU=Groups,OU=someOU,DC=my,DC=domain',
      6 => '####',
      7 => '####',
      8 => '####',
      9 => '####',
    ),
    13 => 'memberof',
    'usnchanged' => 
    array (
      'count' => 1,
      0 => '3982289',
    ),
    14 => 'usnchanged',
    'proxyaddresses' => 
    array (
      'count' => 7,
      0 => '####',
      1 => '####',
      2 => '####',
      3 => '####',
      4 => '####',
      5 => '####',
      6 => '####',
    ),
    15 => 'proxyaddresses',
    'homemdb' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    16 => 'homemdb',
    'mdbusedefaults' => 
    array (
      'count' => 1,
      0 => 'TRUE',
    ),
    17 => 'mdbusedefaults',
    'mailnickname' => 
    array (
      'count' => 1,
      0 => 'fred',
    ),
    18 => 'mailnickname',
    'name' => 
    array (
      'count' => 1,
      0 => 'tester',
    ),
    19 => 'name',
    'objectguid' => 
    array (
      'count' => 1,
      0 => '<2‹.Àª	EœÌÅï��oî',
    ),
    20 => 'objectguid',
    'useraccountcontrol' => 
    array (
      'count' => 1,
      0 => '66048',
    ),
    21 => 'useraccountcontrol',
    'badpwdcount' => 
    array (
      'count' => 1,
      0 => '0',
    ),
    22 => 'badpwdcount',
    'codepage' => 
    array (
      'count' => 1,
      0 => '0',
    ),
    23 => 'codepage',
    'countrycode' => 
    array (
      'count' => 1,
      0 => '0',
    ),
    24 => 'countrycode',
    'badpasswordtime' => 
    array (
      'count' => 1,
      0 => '132397147069218117',
    ),
    25 => 'badpasswordtime',
    'lastlogoff' => 
    array (
      'count' => 1,
      0 => '0',
    ),
    26 => 'lastlogoff',
    'lastlogon' => 
    array (
      'count' => 1,
      0 => '132397149483435657',
    ),
    27 => 'lastlogon',
    'pwdlastset' => 
    array (
      'count' => 1,
      0 => '132393601472194926',
    ),
    28 => 'pwdlastset',
    'primarygroupid' => 
    array (
      'count' => 1,
      0 => '513',
    ),
    29 => 'primarygroupid',
    'profilepath' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    30 => 'profilepath',
    'objectsid' => 
    array (
      'count' => 1,
      0 => '��' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '��' . "\0" . '' . "\0" . '' . "\0" . '¶Dä#�Àê2Ûë�P}-' . "\0" . '' . "\0" . '',
    ),
    31 => 'objectsid',
    'admincount' => 
    array (
      'count' => 1,
      0 => '1',
    ),
    32 => 'admincount',
    'accountexpires' => 
    array (
      'count' => 1,
      0 => '9223372036854775807',
    ),
    33 => 'accountexpires',
    'logoncount' => 
    array (
      'count' => 1,
      0 => '0',
    ),
    34 => 'logoncount',
    'samaccountname' => 
    array (
      'count' => 1,
      0 => 'fred',
    ),
    35 => 'samaccountname',
    'samaccounttype' => 
    array (
      'count' => 1,
      0 => '805306368',
    ),
    36 => 'samaccounttype',
    'showinaddressbook' => 
    array (
      'count' => 4,
      0 => '####',
      1 => '####',
      2 => '####',
      3 => '####',
    ),
    37 => 'showinaddressbook',
    'legacyexchangedn' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    38 => 'legacyexchangedn',
    'userprincipalname' => 
    array (
      'count' => 1,
      0 => 'fred@my.domain',
    ),
    39 => 'userprincipalname',
    'lockouttime' => 
    array (
      'count' => 1,
      0 => '0',
    ),
    40 => 'lockouttime',
    'lastknownparent' => 
    array (
      'count' => 1,
      0 => 'OU=Test,OU=Users,OU=someOU,DC=my,DC=domain',
    ),
    41 => 'lastknownparent',
    'objectcategory' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    42 => 'objectcategory',
    'dscorepropagationdata' => 
    array (
      'count' => 1,
      0 => '16010101000000.0Z',
    ),
    43 => 'dscorepropagationdata',
    'lastlogontimestamp' => 
    array (
      'count' => 1,
      0 => '132393601780066773',
    ),
    44 => 'lastlogontimestamp',
    'msds-supportedencryptiontypes' => 
    array (
      'count' => 1,
      0 => '0',
    ),
    45 => 'msds-supportedencryptiontypes',
    'msds-lastknownrdn' => 
    array (
      'count' => 1,
      0 => 'tester',
    ),
    46 => 'msds-lastknownrdn',
    'mail' => 
    array (
      'count' => 1,
      0 => 'fred@my.domain',
    ),
    47 => 'mail',
    'thumbnailphoto' => 
    array (
      'count' => 1,
      0 =>####
    ),
    48 => 'thumbnailphoto',
    'msexchhomeservername' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    49 => 'msexchhomeservername',
    'msexchmailboxsecuritydescriptor' => 
    array (
      'count' => 1,
      0 => '�' . "\0" . '�Œ�' . "\0" . '' . "\0" . '' . "\0" . ' ' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . ',' . "\0" . '' . "\0" . '' . "\0" . '��' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '�
' . "\0" . '' . "\0" . '' . "\0" . '��' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '�
' . "\0" . '' . "\0" . '' . "\0" . '�' . "\0" . '@' . "\0" . '�' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '��' . "\0" . '�' . "\0" . '�' . "\0" . '��' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '�
' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '�$' . "\0" . '�' . "\0" . '' . "\0" . '' . "\0" . '��' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '��' . "\0" . '' . "\0" . '' . "\0" . '¶Dä#�Àê2Ûë�PÎ+' . "\0" . '' . "\0" . '',
    ),
    50 => 'msexchmailboxsecuritydescriptor',
    'msexchuseraccountcontrol' => 
    array (
      'count' => 1,
      0 => '0',
    ),
    51 => 'msexchuseraccountcontrol',
    'msexchmailboxguid' => 
    array (
      'count' => 1,
      0 => 'I©�„¥CJ°ùX„Nùi',
    ),
    52 => 'msexchmailboxguid',
    'msexchpoliciesincluded' => 
    array (
      'count' => 2,
      0 => '4dde4918-7608-4c22-b276-64f5eb00c3e4',
      1 => '{26491cfc-9e50-4857-861b-0cb8df22b5d7}',
    ),
    53 => 'msexchpoliciesincluded',
    'msrtcsip-internetaccessenabled' => 
    array (
      'count' => 1,
      0 => 'TRUE',
    ),
    54 => 'msrtcsip-internetaccessenabled',
    'msexchmailboxtemplatelink' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    55 => 'msexchmailboxtemplatelink',
    'msexchdelegatelistlink' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    56 => 'msexchdelegatelistlink',
    'msrtcsip-optionflags' => 
    array (
      'count' => 1,
      0 => '2305',
    ),
    57 => 'msrtcsip-optionflags',
    'msrtcsip-userpolicies' => 
    array (
      'count' => 1,
      0 => '0=666577031',
    ),
    58 => 'msrtcsip-userpolicies',
    'msexchumdtmfmap' => 
    array (
      'count' => 4,
      0 => 'reversedPhone:14254',
      1 => 'emailAddress:3733',
      2 => 'lastNameFirstName:83783747',
      3 => 'firstNameLastName:47837837',
    ),
    59 => 'msexchumdtmfmap',
    'msexchmdbrulesquota' => 
    array (
      'count' => 1,
      0 => '256',
    ),
    60 => 'msexchmdbrulesquota',
    'msexchprevioushomemdb' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    61 => 'msexchprevioushomemdb',
    'msexchrecipientdisplaytype' => 
    array (
      'count' => 1,
      0 => '1073741824',
    ),
    62 => 'msexchrecipientdisplaytype',
    'msrtcsip-primaryuseraddress' => 
    array (
      'count' => 1,
      0 => 'sip:fred@my.domain',
    ),
    63 => 'msrtcsip-primaryuseraddress',
    'msrtcsip-deploymentlocator' => 
    array (
      'count' => 1,
      0 => 'SRV:',
    ),
    64 => 'msrtcsip-deploymentlocator',
    'msexchpublicfoldermailbox' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    65 => 'msexchpublicfoldermailbox',
    'msrtcsip-userroutinggroupid' => 
    array (
      'count' => 1,
      0 => 'yôn×Ä�-_¬¤TòíÔ³�',
    ),
    66 => 'msrtcsip-userroutinggroupid',
    'msrtcsip-userenabled' => 
    array (
      'count' => 1,
      0 => 'TRUE',
    ),
    67 => 'msrtcsip-userenabled',
    'msexchelcmailboxflags' => 
    array (
      'count' => 1,
      0 => '2',
    ),
    68 => 'msexchelcmailboxflags',
    'msexchwhenmailboxcreated' => 
    array (
      'count' => 1,
      0 => '20160115162536.0Z',
    ),
    69 => 'msexchwhenmailboxcreated',
    'msexchrbacpolicylink' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    70 => 'msexchrbacpolicylink',
    'msrtcsip-primaryhomeserver' => 
    array (
      'count' => 1,
      0 => '####',
    ),
    71 => 'msrtcsip-primaryhomeserver',
    'msexchsafesendershash' => 
    array (
      'count' => 1,
      0 => 't¨¤§',
    ),
    72 => 'msexchsafesendershash',
    'msexchversion' => 
    array (
      'count' => 1,
      0 => '88218628259840',
    ),
    73 => 'msexchversion',
    'msrtcsip-federationenabled' => 
    array (
      'count' => 1,
      0 => 'TRUE',
    ),
    74 => 'msrtcsip-federationenabled',
    'msexchrecipienttypedetails' => 
    array (
      'count' => 1,
      0 => '1',
    ),
    75 => 'msexchrecipienttypedetails',
    'count' => 76,
    'dn' => '####',
  ),
)
2020-07-22 09:15:08 srv-wiki-1 wiki_db: Ran LDAP search for '(userprincipalname=fred@my.domain)' in 0.0019741058349609 seconds.

2020-07-22 09:15:08 srv-wiki-1 wiki_db: Authenticated new user: fred
2020-07-22 09:15:09 srv-wiki-1 wiki_db: User is authorized.

Osnard (talkcontribs)

So the last two lines look good. So there is still the message "Auto-creation of a local account failed: You have not specified a valid username"? In which context?

Scoobydoo321 (talkcontribs)

This message appears when i try to login with <username>@<my.domain>

Osnard (talkcontribs)

And if you don't use a username with "@"? Which error do you get then? Because

2020-07-22 09:15:08 srv-wiki-1 wiki_db: Authenticated new user: fred
2020-07-22 09:15:09 srv-wiki-1 wiki_db: User is authorized.

looks good.

Scoobydoo321 (talkcontribs)

Whit the config as is i get following error Could not authenticate credentials against domain "my.domain" when i change the searchattribute setting to samaccountname i get the same error as before.

Osnard (talkcontribs)

If you are getting Could not authenticate credentials against domain "my.domain" then it is form based authentication (FBA). This should be the exact same mechanism as the CheckLogin.php CLI script.

Scoobydoo321 (talkcontribs)

The message Could not authenticate credentials against domain "my.domain" i get only when i have a missmatch to what i check for login and what i use. When i use the right credentials i always get Auto-creation of a local account failed: You have not specified a valid username .

Osnard (talkcontribs)

I have noticed a difference in the two contigutations you have shared (#1: PHP, #2: JSON): In the PHP configuration you have "usernameattribute" => "userprincipalname", , while in the JSON you have "usernameattribute": "samaccountname", .

Can you tell which one of them is currently used?

Because the one from the JSON file seems to be correct (samaccountname ), while the one from PHP will result in a username with an "@", which could lead to Auto-creation of a local account failed: You have not specified a valid username</could>.

Scoobydoo321 (talkcontribs)

currently used is the JSON, with the samaccountname

Scoobydoo321 (talkcontribs)

Which element example: usernameattribute is used for the DB column user_name? Have i mixed up something so that the authorization works but it uses the wrong attribute for the DB?

Osnard (talkcontribs)
Scoobydoo321 (talkcontribs)

i can now login with an administrator accoutn samaccountname=admintest but with an normal user samaccountname=u12345678 i still have the error Auto-creation of a local account failed: You have not specified a valid username. i've searched this wiki i didn't found any restriction that the username can't be with a letter and numbers.

Osnard (talkcontribs)
Scoobydoo321 (talkcontribs)

in the error log i see the correct username and in the ldap.log i get following output: MediaWiki\Extension\LDAPProvier\Client::getSearchString: User DN is 'BASE DN'

ldap_bind( $linkID, $bindRDN = 'BASE DN', $bindPasswor = 'XXXX' );

#returns 1

Authenticated new user: username

User is authorized

Osnard (talkcontribs)

So everything is okay. Sorry, I can not spot an error.

Scoobydoo321 (talkcontribs)

hmm ok.

Then i have only one question, is it possible, that the old users with an "@" in the username can make some problems?

I think they wount be a problem but this is the last thing i can imagen.


Best regards and thanks for the perfect support!

Osnard (talkcontribs)

Okay. Can you please again share you complete current configuration (PHP and JSON, is used). Don't forget to remove sensitive data of course. Also please tell me what username you enter into the "Special:Login" field and how the command line for the working "CheckLogin.php" and "ShowUserInfo.php" looks like. Thanks.

2001:1284:F016:9AB4:714A:804:A9D5:8776 (talkcontribs)

I have the similar problem (Auto-creation of a local account failed: You have not specified a valid username) when a try login in a existent dababase, but in a new database created with the 1.34.2 version that's work. I use the same configuration file, changing only the database config.

Scoobydoo321 (talkcontribs)

I have found a ugly workarround i added folowing line to the LocalSettings.php $wgInvalidUsernameCharacters = '#€'; The "ShowUserInfo.php" returns the user informations and the "CheckLogin.php" returns OK.

Here is my LocalSettings.php:

<?php
#This file was automatically generated by the MediaWiki 1.23.15
#installer. If you make manual changes, please keep track in case you
#need to recreate them later.
#
#See includes/DefaultSettings.php for all configurable settings
#and their default values, but don't forget to make changes in _this_
#file, not there.
#
#Further documentation for configuration settings may be found at:
#https://www.mediawiki.org/wiki/Manual:Configuration_settings

#Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
	exit;
}

##Uncomment this to disable output compression
#$wgDisableOutputCompression = true;

$wgSitename = "Wiki";
$wgOverrideHostname = "MediaWiki-Server";
##The URL base path to the directory containing the wiki;
##defaults for all runtime URL paths are based off of this.
##For more information on customizing the URLs
##(like /w/index.php/Page_title to /wiki/Page_title) please see:
##https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "";
$wgScriptExtension = ".php";

##The protocol and server name to use in fully-qualified URLs
$wgServer = "https://MediaWiki-Server";

##The relative URL path to the skins directory
$wgStylePath = "$wgScriptPath/skins";

##The relative URL path to the logo.  Make sure you change this from the default,
##or else you'll overwrite your logo when you upgrade!
$wgLogo = "$wgStylePath/common/images/logo.png";

##UPO means: this is also a user preference option

$wgEnableEmail = false;
$wgEnableUserEmail = false; # UPO

$wgEmergencyContact = "apache@MediaWiki-Server";
$wgPasswordSender = "apache@MediaWiki-Server";

$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
#$wgEmailAuthentication = true;

##Database settings
$wgDBtype = "mysql";
$wgDBserver = "MediaWiki-DB";
$wgDBname = "WikiDB";
$wgDBuser = "WikiDBUser";
$wgDBpassword = "SecretPassword";

#MySQL specific settings
$wgDBprefix = "";

#MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";

#Experimental charset support for MySQL 5.0.
$wgDBmysql5 = false;

##Shared memory settings
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = array();
##To enable image uploads, make sure the 'images' directory
##is writable, then set this to true:
$wgEnableUploads = true;
#$wgUseImageMagick = true;
#$wgImageMagickConvertCommand = "/usr/bin/convert";

#InstantCommons allows wiki to use images from http://commons.wikimedia.org
$wgUseInstantCommons = false;

##If you use ImageMagick (or any other shell command) on a
##Linux server, this will need to be set to the name of an
##available UTF-8 locale
$wgShellLocale = "en_US.utf8";

##If you want to use image uploads under safe mode,
##create the directories images/archive, images/thumb and
##images/temp, and make them all writable. Then uncomment
##this, if it's not already uncommented:
#$wgHashedUploadDirectory = false;

##Set $wgCacheDirectory to a writable directory on the web server
##to make your wiki go slightly faster. The directory should not
##be publically accessible from the web.
#$wgCacheDirectory = "$IP/cache";

#Site language code, should be one of the list in ./languages/Names.php
$wgLanguageCode = "en";

$wgSecretKey = "SomeSecretKey";

#Site upgrade key. Must be set to a string (default provided) to turn on the
#web installer while LocalSettings.php is in place
$wgUpgradeKey = "SomeUpgradeKey";

##Default skin: you can change the default skin. Use the internal symbolic
##names, ie 'cologneblue', 'monobook', 'vector':
$wgDefaultSkin = "vector";

##For attaching licensing metadata to pages, and displaying an
##appropriate copyright notice / icon. GNU Free Documentation
##License and Creative Commons licenses are supported so far.
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";

#Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";

###Debug Log Path ###

$wgShowExceptionDetails;

 
$wgDebugLogGroups['PluggableAuth'] =
$wgDebugLogGroups['LDAP'] =
$wgDebugLogGroups['MediaWiki\\Extension\\LDAPProvider\\Client'] =
$wgDebugLogGroups['LDAPUserInfo'] =
$wgDebugLogGroups['LDAPAuthentication2'] =
$wgDebugLogGroups['LDAPAuthorization'] = '/var/www/html/wiki/ldap.log';



$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = true;


$wgGroupPermissions['user']['edit'] = true;
$wgGroupPermissions['user']['editsemiprotected'] = false;
$wgGroupPermissions['user']['editprotected'] = false;
$wgEmailConfirmToEdit = false;


$wgGroupPermissions['Media-Wiki-Admin'] = $wgGroupPermissions['sysop'];

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


$wgBlockDisablesLogin = true;


$ldapJsonFile = "$IP/ldap.json";
$ldapConfig = false;
if (is_file($ldapJsonFile) && is_dir("$IP/extensions/LDAPProvider")) {
	$testJson = @json_decode(file_get_contents($ldapJsonFile),true);
	if (is_array($testJson)) {
		$ldapConfig = true;
	} else {
		error_log("Found invalid JSON in file: $IP/ldap.json");
	}
}
if ( $ldapConfig ) {
####Load Extensions ###
  wfLoadExtension( 'Auth_remoteuser' );
  wfLoadExtension( 'WikiEditor' );
  wfLoadExtension( 'PluggableAuth' );
  wfLoadExtension( 'LDAPProvider' );
  wfLoadExtension( 'LDAPAuthentication2' );
  #wfLoadExtension( 'LDAPAuthorization' );
  #wfLoadExtension( 'LDAPUserInfo' );
  wfLoadExtension( 'LDAPGroups' );
  $LDAPProviderDomainConfigs = $ldapJsonFile;
  $wgPluggableAuth_ButtonLabel = "Json works";
#if ($wikiRequestSafe) {$LDAPAuthentication2AllowLocalLogin = true; }
}

$LDAPAuthentication2AllowLocalLogin = true;

$wgAuthRemoteuserUserNameReplaceFilter = [
	'@some.domain$' => 
];
$wgInvalidUsernameCharacters = '#'; #Now the login and autocreate of User works ==> but the e-mail is in the user_name field which is not recomended by WIKI


$LDAPAuthentication2UsernameNormalizer = 'strtolower';
$LDAPProviderDomainConfigs = "$IP/ldap.json";

wfLoadSkin( 'CologneBlue' );
wfLoadSkin( 'Modern' );
wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Timeless' );
wfLoadSkin( 'Vector' );

and here is my ldap.json:

{
	"some.domain": {
		"connection": {
			"server": "adserver.some.domain",
			"port": "636",
                        "user": "CN=srvwikiadauth,OU=ServiceAccounts,OU=other,DC=some,DC=domain",
                        "pass": "SecretPassword",
			"enctype": "ssl",
			"options": {
				"LDAP_OPT_DEREF": "1"
			},
			"basedn": "dc=some,dc=domain",
                        "groupbasedn": "dc=some,dc=domain",
                        "userbasedn": "dc=some,dc=domain",
                        "searchattribute": "userprincipalname",
			"usernameattribute": "userprincipalname",
			"realnameattribute": "cn",
			"emailattribute": "userprincipalname",
			"grouprequest": "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::factory"

		},
                "userinfo": {
                        "attributes-map": {
                                "email": "mail",
                                "realname": "cn"
                        }
                },
		"authorization": {
			"rules": {
				"groups": {
					"required": 
						["CN=Media-Wiki-Admin,OU=Application_Groups,OU=Groups,OU=other,DC=some,DC=domain", "CN=Media-Wiki-User,OU=Application_Groups,OU=Groups,OU=other,DC=some,DC=domain"]
				}
			}
		},

		"groupsync": {
			"mapping": {
				"Media-Wiki-Admin": "CN=Media-Wiki-Admin,OU=Application_Groups,OU=Groups,OU=other,DC=some,DC=domain",
				"user": "CN=Media-Wiki-User,OU=Application_Groups,OU=Groups,OU=other,DC=some,DC=domain"
			}
		}
	}
}

best regards

Osnard (talkcontribs)
  1. You should not have your "ldap.json" witin $IP. The webserver might make it public.
  2. There is no need to have "user" in the "groupsync.mapping", as everybody that gets logged in is automatically in "user"
  3. You have "Extension:LDAPAuthorization" disabled, so the "authorization" section in the domain config will have no effect
  4. "connection.usernameattribute", as well as "connection.searchattribute" should be "samaccountname", not "userprincipalname". Users must then use "Fred" instead of "fred@some.domain" in the login form
    1. Looks like you are using network-based authentication (Kerberos) with "Extension:Auth_remoteuser". You should enable "Extension:LDAPAuthorization" and set $LDAPAuthorizationAutoAuthRemoteUserStringParser = 'username-at-domain';. You can then get rid of the $wgAuthRemoteuserUserNameReplaceFilter setting
Scoobydoo321 (talkcontribs)

I tried your changes, the login works for the adminuser, but when i trie to login with "Fred" i get the same error. When i test with a normal user (samaccountname=B12345678) i get the error Auto-creation of a local account failed: You have not specified a valid username does the wiki check if a username contains a lot of numbers?

Osnard (talkcontribs)

Have you re-enabled LDAPAuthorization? Does LDAPProvider/maintenance/ShowUserGroups.php list the group DNs you have configured in the "authorization.rules.groups.required" section?

Scoobydoo321 (talkcontribs)

Yes i have re-enabled LDAPAuthorization, and the result from "ShowUserGroups.php" is like defined in the "authorization.rules.goroups.required" In the "ldap.log" i see Authenticated new user: fred User is authorized

Osnard (talkcontribs)

So you are not having $wgAuthRemoteuserUserNameReplaceFilter set anymore? But instead configured$LDAPAuthorizationAutoAuthRemoteUserStringParser = 'username-at-domain';?

Any other Auth_remoteuser related config?

I am running out of ideas. If it says Authenticated new user: fred User is authorized anything should be fine.

Scoobydoo321 (talkcontribs)

i had $LDAPAuthorizationAutoAuthRemoteUserStringParser = 'username-at-domain'; not activated, if i activate this and set "usernameattribute": "samaccountname", in ldap.json i get the message in the UI user u12345678 not authorized and the log says authorization failure and the CheckLogin.php returns OK

Osnard (talkcontribs)

Sorry to ask again, but you are sure you have not set $wgAuthRemoteuserUserNameReplaceFilter anymore? Please check if $username that arrives here is actually in the format <username@domain.

Reply to "Auto-creation of a local account failed: You have not specified a valid username"

Admin(s) spammed by confirmed email account requests

1
2.218.206.44 (talkcontribs)

As an admin I seem to get multiple emails asking me to approve the same account that has had its email confirmed. These all arrive within a few minutes of each other. I originally assumed this was spammers deliberately clicking on the "confirm email" link multiple times. However, since upgrading my wiki (to 1.31.8 LTS) I have been doing some testing and found that Outlook's Safelinks protection will check this link, so that would lead to me as an admin receiving an "account request with confirmed email" email even before the user would have had a chance to click on the link the "confirm email" email. Also, I suspect it is easy to accidentally click the link multiple times or a user might just think they have done something wrong when their account is not immediately activated and click the link a second or third time.

It would be useful if there was some timeout to prevent multiple emails being sent out in a short space of time to the accounts admin(s). At the moment I have hacked the code so that admins only ever receive one email for any account request. This is sufficient for my needs, as the urgency of requests is low but the frequency is sufficiently high that if I miss one I will deal with that when I get another account request a day or two later.

Reply to "Admin(s) spammed by confirmed email account requests"

Many repeating notification emails to admin

6
Wmat (talkcontribs)

Whenever someone requests an account on my wiki, I get notified of the account request via email, which is good. However, I get notified up to 7 times. Could this be caused by the extension, or is this likely a mail setup issue?

Wmat (talkcontribs)

Still an issue with REL1_31. I get 7 email when an account is requested.

Reboulip (talkcontribs)

I get the same issue, but with only 2 e-mails (same for all bureaucrats)

Reboulip (talkcontribs)

I tried the following fix, and it worked for my case: set the following properties in LocalSettings.php:

$wgConfirmAccountContact = ''; # to make sure this variable is set

$wgGroupPermissions['*']['confirmaccount-notify'] = false; # withdraw all notifications

$wgGroupPermissions['bureaucrat']['confirmaccount-notify'] = true; # enable notification to bureaucrats

However, I'm not sure why this worked...

Reboulip (talkcontribs)

(I actually still get double notifications sometimes)

Ulrich C. Thiess (talkcontribs)

Wiki 1.34.2

The administrator and the user will receive a confirmation email with the confirmation link.

Reply to "Many repeating notification emails to admin"

[SOLVED] Request account button not showing up on main page for 1.34 -- working for 1.33

5
Paulette00 (talkcontribs)

I must have done something idiotic but somehow I can't make the "request account" to appear for potential new users. The mediawiki (1.34) setup is private. The extension is also 1.34 compatible. Permissions are set up as:

$wgGroupPermissions['*']['read'] = false;

with

$wgWhitelistRead = array(

  "Special:Request account",

  "Spécial:Demander un compte"

);


What is missing ?

Many thanks.

Spas.Z.Spasov (talkcontribs)

Hello, please read this post of mine. I think it could help.

Paulette00 (talkcontribs)

Ok thanks, I've seen it, and I don't have errors (when for example using mediawiki:loginprompt to make the request account page appear).

Nevertheless, I'll have a go at what you suggest, and report here.

Paulette00 (talkcontribs)

Hello, I did do as you suggested by adding/rewriting the hook to display the RequestAccount button. I did not touch at the ConfirmEdit bit: there are no errors showing up in the logs.

But the whole lot didn't work.


However: this feature worked with the MW version 1.33. I did not check when upgrading to 1.34 if the the feature was still alive. So, to make sure, I replaced the ConfirmAccount directory from 1.34 by the one from 1.33. And .... it did work. So I don't really know what's happening here: a quick diff on both directories didn't enlightnen me.


Conclusion: I stay with ConfirmAccount 1.33 until I have better ideas...

Paulette00 (talkcontribs)

Here we go, I found my answer (got it of course from comparing 1.34 with 1.33):

in frontend/ConfirmAccountUI.hooks.php, line 32:

replace

if ( isset( $personal_urls['login'] ) ) {

with

if ( isset( $personal_urls['login'] )

        || isset( $personal_urls['login-private'] ) ) {

... which shows that the problem originated from my wiki being private!


Reply to "[SOLVED] Request account button not showing up on main page for 1.34 -- working for 1.33"

ConfirmAccount doesn't work with MW 1.33 and 1.34 [Solved]

2
Summary by Spas.Z.Spasov

The main troublemaker was the parameter $wgCaptchaClass = 'SimpleCaptcha';, which I was set according to Extension:ConfirmEdit's setup. Read my last replay below for more details.

Spas.Z.Spasov (talkcontribs)

Hello, last month I've updated to MW 1.33, since then the Extension:ConfirmAccount doesn't work.

  1. *Request account* is not displayed within the users interface while $wgGroupPermissions['*']['read'] = false;, no matter the other settings.
  1. Specal:RequestAccount returns HTTP ERROR 500 (actually I'm using bulgarian language and the name of the page is Специални:RequestAccount).

Im using the extension since MW 1.27, here is the relevant part of my `LocalSettings.php` (that serves well befotre MW 1.33 update):

require_once "$IP/extensions/ConfirmAccount/ConfirmAccount.php";
$wgConfirmAccountContact = 'my@e.mail';

$wgWhitelistRead[] = 'Начална_страница';
$wgWhitelistRead[] = 'Special:RequestAccount';
$wgWhitelistRead[] = 'Специални:RequestAccount';

// $wgConfirmAccountRequestFormItems['Biography']['enabled'] = false;
// $wgConfirmAccountRequestFormItems['Biography']['minWords'] = 5;
// $wgGroupPermissions['sysop']['createaccount'] = false;


$wgMakeUserPageFromBio = false;
$wgAutoWelcomeNewUsers = false;
$wgConfirmAccountRequestFormItems = array(
        'UserName'        => array( 'enabled' => true ),
        'RealName'        => array( 'enabled' => false ),
        'Biography'       => array( 'enabled' => false, 'minWords' => 5 ),
        'AreasOfInterest' => array( 'enabled' => false ),
        'CV'              => array( 'enabled' => false ),
        'Notes'           => array( 'enabled' => true, ),
        'Links'           => array( 'enabled' => false ),
        'TermsOfService'  => array( 'enabled' => false ),
);

// Add properly "Request Accaunt" ("Заявка за смерка") link in the user's interface
$wgHooks['PersonalUrls'][] = 'onPersonalUrls';
function onPersonalUrls( array &$personal_urls, Title $title, SkinTemplate $skin  ) {
    // Add a link to Special:RequestAccount if a link exists for login
    if ( isset( $personal_urls['login'] ) || isset( $personal_urls['anonlogin'] ) ) {
        $personal_urls['createaccount'] = array(
            'text' => wfMessage( 'requestaccount' )->text(),
            'href' => SpecialPage::getTitleFor( 'RequestAccount' )->getFullURL()
        );
    }
    return true;
}

Is there some solution?

Spas.Z.Spasov (talkcontribs)

Finally I managed to solve my issue.

The main troublemaker was the parameter $wgCaptchaClass = 'SimpleCaptcha';, which I was set according to Extension:ConfirmEdit's setup. I switched to wfLoadExtension( 'ConfirmEdit/MathCaptcha' ); and now Extension:ConfirmAccount works properly.

Another issue was the condition:

if ( isset( $personal_urls['login'] ) || isset( $personal_urls['anonlogin'] ) ) { ... }

Here is my current setup that works as it is expected with MW 1.33 and 1.34:

## Extension:ConfirmAccount -----
require_once "$IP/extensions/ConfirmAccount/ConfirmAccount.php";

$wgWhitelistRead = array_merge($wgWhitelistRead, array('Специални:Създаване_на_сметка', 'Special:RequestAccount', 'Специални:RequestAccount'));

$wgMakeUserPageFromBio = false;
$wgAutoWelcomeNewUsers = false;

$wgConfirmAccountRequestFormItems = array(
	'UserName'        => array( 'enabled' => true ),
	'RealName'        => array( 'enabled' => false ),
	'Biography'       => array( 'enabled' => false, 'minWords' => 5 ),
	'AreasOfInterest' => array( 'enabled' => false ),
	'CV'              => array( 'enabled' => false ),
	'Notes'           => array( 'enabled' => true, ),
	'Links'           => array( 'enabled' => false ),
	'TermsOfService'  => array( 'enabled' => false ),
);
// $wgConfirmAccountRequestFormItems['Biography']['enabled'] = false;
// $wgConfirmAccountRequestFormItems['Biography']['minWords'] = 5;
// $wgGroupPermissions['sysop']['createaccount'] = false;

$wgConfirmAccountContact = 'admin@trivictoria.org';

$wgHooks['PersonalUrls'][] = 'ConfirmAccountCustomHooks::onPersonalUrls';
class ConfirmAccountCustomHooks {
	public static function onPersonalUrls( array &$personal_urls, Title $title, SkinTemplate $skin ) {
	    if (isset($personal_urls['login-private']['text'])) {
		    $personal_urls['createaccount'] = array(
					'text' => wfMessage( 'requestaccount' )->text(),
					'href' => SpecialPage::getTitleFor( 'RequestAccount' )->getFullURL()
			);
	    }
		return true;
	}
}


## Extension:ConfirmEdit -----
//wfLoadExtension( 'ConfirmEdit' );
//$wgCaptchaClass = 'SimpleCaptcha';

//wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/FancyCaptcha' ]);
//$wgCaptchaClass = 'FancyCaptcha';

wfLoadExtension( 'ConfirmEdit/MathCaptcha' );

A database query error has occurred. This may indicate a bug in the software.

28
OlivierCompagne (talkcontribs)

I installed ConfirmAccount, all went well. I updated the database via the web.

I tested the account request, and I rejected my test account, and it worked. Today someone requested an account; I wanted to accept it, but when I submit, it gives me that error message: "A database query error has occurred. This may indicate a bug in the software." See screenshot of the error page: http://screencast.com/t/lPU4IyEXjX

Can anyone help? I don't know what to do to fix this issue. Thanks!

FYI my environment info: MediaWiki 1.23.2 PHP 5.3.28 (cgi-fcgi) MySQL 5.1.67-rel14.3-log

128.250.26.189 (talkcontribs)

I have the same exact version and issue

Donkey Kong Genius (talkcontribs)

I have this error as well. As far as I can see everything about the confirm account extension seems to work. If I confirm an account to approve it, then I get the same error on the wiki page. Any one understanding this issue and willing to help?

91.61.79.41 (talkcontribs)

Same for me. I have this error for a few days. I deleted all my tables in the db and all files on my space so I have a complete clean installation. But I still can't install mediawiki.

No my error changes from the one above to: Function: DatabaseBase::sourceFile( /home/webpages/lima-city/wod-berlin/html/maintenance/tables.sql ) Error: 1146 Table 'db_287222_1.user' doesn't exist (mysql.lima-city.de)

So what am I supposed to do now?!

CookipediaChef~mediawikiwiki (talkcontribs)

I have the same problem on a new installation, though I have copied tables from another database. I'm now wondering if that's where the problem lies?

A database query error has occurred. This may indicate a bug in the software.

  • MW 1.24.0
  • PHP 5.3.3 (apache2handler)
  • mySQL 5.1.73
  • Confirm account – (75bdde7) 20:50, 12 November 2014

This post was posted by CookipediaChef~mediawikiwiki, but signed as CookipediaChef.

Nemo bis (talkcontribs)

Copied tables? And did you run update.php then?

88.106.73.51 (talkcontribs)

I have exactly same problem after upgrade to MW 1.24. Reinstalled confirmaccount, and run update.php but it's not helping

Database error A database query error has occurred. This may indicate a bug in the software.

Query: INSERT INTO `y5m_account_credentials` (acd_user_id,acd_real_name,acd_email,acd_email_authenticated,acd_bio,acd_notes,acd_urls,acd_ip,acd_xff,acd_agent,acd_filename,acd_storage_key,acd_areas,acd_registration,acd_accepted,acd_user,acd_comment,acd_id) VALUES ('682','Ričardas','ryckaxxl60@gmail.com','20141202143609',,,,'78.62.161.58',,'Mozilla/5.0 (Windodws NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36',NULL,'soft_escwiki-y5m_:acctrequest:ip:78.62.161.58',,'20141201022523','20141204123207','2',,NULL) Function: AccountConfirmSubmission::acceptRequest Error: 1054 Unknown column 'acd_xff' in 'field list' (localhost)

188.226.181.10 (talkcontribs)

Same: SELECT COUNT(*) FROM `account_requests` WHERE acr_type = '0' AND acr_deleted = '0' AND (acr_held IS NULL) LIMIT 1 1146 Table 'wiki.account_requests' doesn't exist (localhost)

Shanumithun (talkcontribs)

how you fix it?even i got the same error

SANtosito (talkcontribs)

So there is no way to fix it?

Aaron Schulz (talkcontribs)

ALTER TABLE /*_*/account_credentials ADD COLUMN acd_xff VARCHAR(255) NULL default ;

Grantbow (talkcontribs)

This did not fix my mediawiki 1.22.6 install.

159.50.16.166 (talkcontribs)

Same Problem. Read somewhere we can try to create these fields manually. Could someone give us the field definition ? (Type, attribute, Null, Default...) Thanks !

98.201.4.33 (talkcontribs)

I not only have that issue, but I'd get the same message when I clicked the Recent Changes link, until I commented out the extension.

75.175.9.66 (talkcontribs)

After upgrading from MW 1.19 to MW 1.23 and ConfirmAccount r115623 to REL1_23, I had to add the acd_xff and acd_agent fields, and I had to add them to account_requests, not account_credentials.

tl;dr: Run these in mysql, substituting your wiki's database name for wikidb:

USE wikidb;
ALTER TABLE mw_account_requests ADD acr_agent VARCHAR(255) NULL default '';''
ALTER TABLE mw_account_requests ADD acr_xff VARCHAR(255) NULL default '';''

There may be a better way to fix it. The underlying problem is that new fields added to ConfirmAccount across LTS version upgrades are not automatically added to the wiki database. Ideally, the extension would attempt to add necessary fields if they don't exist.

--

The error and backtrace:

A database query error has occurred. This may indicate a bug in the software.

Query:
INSERT INTO `mw_account_requests` (acr_id,acr_name,acr_email,acr_real_name,acr_registration,acr_bio,acr_notes,acr_urls,acr_type,acr_areas,acr_filename,acr_storage_key,acr_comment,acr_ip,acr_xff,acr_agent,acr_deleted,acr_email_token,acr_email_token_expires) VALUES (NULL,'Z','x@y.z','aowiefawe','20150712184313','Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum.','','','0','',NULL,'wikidb-mw_:acctrequest:ip:--.--.--.--','','--.--.--.--','','Mozilla/5.0 (X11; CrOS x86_64 6946.70.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36','0','--','20150811184313')''
Function: UserAccountRequest::insertOn
Error: 1054 Unknown column 'acr_xff' in 'field list' (localhost)
Backtrace:

#0 /var/www/wiki/includes/db/Database.php(1123): DatabaseBase->reportQueryError('Unknown column ...', 1054, 'INSERT  INTO `m...', 'UserAccountRequ...', false)
#1 /var/www/wiki/includes/db/Database.php(1920): DatabaseBase->query('INSERT  INTO `m...', 'UserAccountRequ...')
#2 /var/www/wiki/extensions/ConfirmAccount/backend/UserAccountRequest.php(358): DatabaseBase->insert('account_request...', Array, 'UserAccountRequ...')
#3 /var/www/wiki/extensions/ConfirmAccount/business/AccountRequestSubmission.php(243): UserAccountRequest->insertOn()
#4 /var/www/wiki/extensions/ConfirmAccount/frontend/specialpages/actions/RequestAccount_body.php(315): AccountRequestSubmission->submit(Object(RequestContext))
#5 /var/www/wiki/extensions/ConfirmAccount/frontend/specialpages/actions/RequestAccount_body.php(80): RequestAccountPage->doSubmit()
#6 /var/www/wiki/includes/specialpage/SpecialPage.php(379): RequestAccountPage->execute(NULL)
#7 /var/www/wiki/includes/specialpage/SpecialPageFactory.php(503): SpecialPage->run(NULL)
#8 /var/www/wiki/includes/Wiki.php(285): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#9 /var/www/wiki/includes/Wiki.php(588): MediaWiki->performRequest()
#10 /var/www/wiki/includes/Wiki.php(447): MediaWiki->main()
#11 /var/www/wiki/index.php(46): MediaWiki->run()
#12 {main}

You can generate this message by adding these to the end of your wiki's LocalSettings.php file:

$wgShowSQLErrors = true;
$wgDebugDumpSql = true;
$wgShowDBErrorBacktrace = true;

--

Console I/O to fix it:

➜  ~  sudo mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1506962
Server version: 5.5.31-0ubuntu0.12.04.1 (Ubuntu)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use wikidb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> ALTER TABLE mw_account_requests ADD acr_agent VARCHAR(255) NULL default '';''
Query OK, 1 row affected (0.10 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> ALTER TABLE mw_account_requests ADD acr_xff VARCHAR(255) NULL default '';''
Query OK, 1 row affected (0.23 sec)
Records: 1  Duplicates: 0  Warnings: 0
75.175.9.66 (talkcontribs)

(To confirm, I did run update.php before any of the above steps. The update.php pass ''is not'' adding this extension's required fields after an upgrade.)

Mojorhino (talkcontribs)

I had this same error. I noticed it right after blocking several of what I thought were fictitious users.

After further review I figured out what was causing the error. Someone at my work created an account without updating any pages so I blocked them thinking they were also a fictitious user. Well, when I blocked them I also blocked their IP address & since we have a static IP at my work that caused me to unintentionally block myself which was ultimately causing in the error message. After unblocking the user with the same IP as mine my problems went away.

Paladox (talkcontribs)
SANtosito (talkcontribs)

Still have this problem and can't find any good solution

88.24.37.65 (talkcontribs)

Hi sirs, i have this problem and it's happening without touch anything in my site, just updating pages i have a lot of work and then this happends :(

Sorry i'm very frustrated about that and don't know how to proceed, please help.

@Paladox could you help me ?

A database query error has occurred. This may indicate a bug in the software.

  • Query: COMMIT
  • Function: LoadBalancer::commitAll
  • Error: 2006 MySQL server has gone away (localhost)

Backtrace:

#0 /home/adminluk/public_html/includes/db/Database.php(1059): DatabaseBase->reportQueryError('MySQL server ha...', 2006, 'COMMIT', 'LoadBalancer::c...', false) #1 /home/adminluk/public_html/includes/db/Database.php(3594): DatabaseBase->query('COMMIT', 'LoadBalancer::c...') #2 /home/adminluk/public_html/includes/db/Database.php(3577): DatabaseBase->doCommit('LoadBalancer::c...') #3 /home/adminluk/public_html/includes/db/LoadBalancer.php(1008): DatabaseBase->commit('LoadBalancer::c...', 'flush') #4 [internal function]: LoadBalancer->commitAll() #5 /home/adminluk/public_html/includes/db/LBFactory.php(176): call_user_func_array(Array, Array) #6 [internal function]: LBFactory->{closure}(Object(LoadBalancer), 'commitAll', Array) #7 /home/adminluk/public_html/includes/db/LBFactory.php(330): call_user_func_array(Object(Closure), Array) #8 /home/adminluk/public_html/includes/db/LBFactory.php(177): LBFactorySimple->forEachLB(Object(Closure), Array) #9 /home/adminluk/public_html/includes/db/LBFactory.php(186): LBFactory->forEachLBCallMethod('commitAll') #10 /home/adminluk/public_html/includes/jobqueue/JobRunner.php(129): LBFactory->commitAll() #11 /home/adminluk/public_html/includes/MediaWiki.php(788): JobRunner->run(Array) #12 /home/adminluk/public_html/includes/MediaWiki.php(746): MediaWiki->triggerJobs() #13 /home/adminluk/public_html/includes/MediaWiki.php(558): MediaWiki->restInPeace('normal') #14 /home/adminluk/public_html/includes/MediaWiki.php(577): MediaWiki->{closure}() #15 /home/adminluk/public_html/includes/MediaWiki.php(520): MediaWiki->doPostOutputShutdown('normal') #16 /home/adminluk/public_html/index.php(41): MediaWiki->run() #17 {main}
Paladox (talkcontribs)
88.24.37.65 (talkcontribs)

Dear @Paladox it was so crazy !!! my site www.wikinnabis.com is working right now. i will describe whats i do to fix it, but very annoyed with this.

1- I don't use this ConfirmAccount extension, i disable the registering feature.

2- I will update to 1.27 right now because now i have a backup working.

3 - "The MAGIC" I'm hosted at Godaddy, Godaddy have installatron to manage servers installs services (instances) like bitnami image service downloads, so you can install, clone, etc

Godaddy tell me that i was hacked in the past and this files are corrupt. Not true ! I When this happends, i restore the entire site to 5 months ago because don't have operative working copy, so imagine to heard this shit. So thinking that the problem is on the DDBB i duplicate the wiki instance to www.site.com/test/ and magically seems that ddbb is now working again. I made a lot of work on marketing this week, the results are awesome but with this servers down make me bad name. Is there any possibility to know exactly something pointing to the true problem ? Because i cannot be looking my domain every hour and then try to fix is something happend, i want just something stable if i don't touch it, hope that i'm asking too much :)

Paladox (talkcontribs)

Hi, you may want to try installing mediawiki your self instead of using the installation managers.

It is easy to do it your self

All you have to do

Is go here Download click download 1.27.

Extract it to your website where ever your website dir is

then you go to your website

for example example.com/mw-config/

then configure your mw.

205.237.78.11 (talkcontribs)

Using version 1.26 I had the same issue and simply ran an update from ssh. Navigate to maintenance folder and run "php Update.php". Fixed my database error.

Wimw (talkcontribs)

Disabling the ConfirmAccount-extension solved the problem for me.

Gopavasanth (talkcontribs)

I am also getting these errors and my mediawiki version is 1.22

A database query error has occurred. This may indicate a bug in the software.

  • Query: SELECT page_id,page_namespace,page_title,page_restrictions,page_counter,page_is_redirect,page_is_new,page_random,page_touched,page_latest,page_len,page_content_model FROM `page` WHERE page_namespace = '0' AND page_title = 'Main_Page' LIMIT 1
  • Function: WikiPage::pageData
  • Error: 1054 Unknown column 'page_counter' in 'field list' (localhost)

Backtrace:

#0 /var/www/html/core_old/includes/db/Database.php(1039): DatabaseBase->reportQueryError('Unknown column ...', 1054, 'SELECT page_id...', 'WikiPage::pageD...', false)

#1 /var/www/html/core_old/includes/db/Database.php(1496): DatabaseBase->query('SELECT page_id...', 'WikiPage::pageD...')

#2 /var/www/html/core_old/includes/db/Database.php(1585): DatabaseBase->select('page', Array, Array, 'WikiPage::pageD...', Array, Array)

#3 /var/www/html/core_old/includes/WikiPage.php(303): DatabaseBase->selectRow('page', Array, Array, 'WikiPage::pageD...', Array)

#4 /var/www/html/core_old/includes/WikiPage.php(322): WikiPage->pageData(Object(DatabaseMysqli), Array, Array)

#5 /var/www/html/core_old/includes/WikiPage.php(361): WikiPage->pageDataFromTitle(Object(DatabaseMysqli), Object(Title))

#6 /var/www/html/core_old/includes/WikiPage.php(444): WikiPage->loadPageData()

#7 /var/www/html/core_old/includes/WikiPage.php(497): WikiPage->exists()

#8 /var/www/html/core_old/includes/WikiPage.php(212): WikiPage->getContentModel()

#9 /var/www/html/core_old/includes/WikiPage.php(198): WikiPage->getContentHandler()

#10 /var/www/html/core_old/includes/Action.php(92): WikiPage->getActionOverrides()

#11 /var/www/html/core_old/includes/Action.php(145): Action::factory('view', Object(WikiPage), Object(RequestContext))

#12 /var/www/html/core_old/includes/Wiki.php(151): Action::getActionName(Object(RequestContext))

#13 /var/www/html/core_old/includes/Wiki.php(531): MediaWiki->getAction()

#14 /var/www/html/core_old/includes/Wiki.php(467): MediaWiki->main()

#15 /var/www/html/core_old/index.php(49): MediaWiki->run()

#16 {main}

Thanks in advance

SANtosito (talkcontribs)
This post was hidden by Commuter3 (history)
Reply to "A database query error has occurred. This may indicate a bug in the software."
Waanders (talkcontribs)

Is it possible to make the RealName field a required field? minWords-param Biography doesn't work for RealName (I also checked AccountRequestSubmission.php).

We use the MW1.27 version of ConfirmAccount.

Regards, Jethro

Chrishel (talkcontribs)

You can do it with a the hook AuthChangeFormFields. Something like this...


public static function onAuthChangeFormFields( $requests, $fieldInfo, &$formDescriptor, $action ) {
    if( isset( $formDescriptor[ 'realname' ] ) ) {
        $formDescriptor[ 'realname' ][ 'required' ] = true;
    }
}
Reply to "Field Real name required"

Custom CSS for Request Account Page?

3
Jakeschroeder (talkcontribs)

It seems it is not possible to write custom css for the Request Account page because no html element on this page has an ID or a class name. I am creating my own skin and I want to be able to change the width of inputs, background color, etc. but I don't want to pollute those components' styles for the entire site.

For example I want the input's background color to be gray on the Request Account page but green on any other page. So how can access just the Request Account page's html elements in my stylesheet.

Thanks so much.

Aaron Schulz (talkcontribs)

You can edit MediaWiki:common.css or use the Gadget extension to make a CSS module enabled for all users.

51.174.7.28 (talkcontribs)

Aaron, @Aaron Schulz

What identifiers can I use in Mediawiki:Common.css to style the elements in the request account page? Is there a list for this somewhere?

Thank you so much, and I really appriciate the ConfirmAccount extention :))

Reply to "Custom CSS for Request Account Page?"