Difference between revisions of "User:Admin"

From FRC11 - Mentor Wiki
Jump to navigation Jump to search
 
(33 intermediate revisions by 2 users not shown)
Line 1: Line 1:
−
Administration Control Panel - [http://mort11.com/mentor.wiki/index.php/Special:SpecialPages]
+
== Change Logs ==
 +
Please update the logs when making relevant administrative changes.
  
 
* [[User:Admin Change Log]] - Administrative Change History across the Wiki
 
* [[User:Admin Change Log]] - Administrative Change History across the Wiki
 +
* [[Security Change Log]] - Administrative Change History affecting security
  
 +
== Actions ==
 +
* [http://mort11.com/mentor.wiki/index.php/Special:SpecialPages Administrative Control Panel] 
 +
:Includes ''Create Account''.  Usernames should be <firstinitial><lastname>. E.g. for Joe Admin the username should be <code>jadmin</code>.
 +
* [http://mort11.com/extplorer Edit Config Files in eXtplorer]
 +
* [http://mort11.com/extplorer Add files for Download in eXtplorer] Add files directly into (not into a subfolder!) in: /downloads/mentor.wiki
 +
* [http://mort11.com/mentor.wiki/index.php/MediaWiki:Sidebar Edit the Sidebar]
 +
* [http://mort11.com/mentor.wiki/index.php/Special:Version Check MediaWiki Versions]
 +
* [https://mort11.com/mentor.wiki/index.php/Special:UserMerge Deleting Users] Merge to user <code>DeletedUsers</code> and check Delete old user.
 +
 +
== How To Administer a MediaWiki ==
 +
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
 +
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings List of Configuration Settings]
 +
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce Join the MediaWiki Release Mailing List]
 +
* [[How to Use a Logo on MediaWiki]]
 
* [[How to Block User Rights]]
 
* [[How to Block User Rights]]
 
* [[How to block new user creation and password reset]]
 
* [[How to block new user creation and password reset]]
 
* [[How to Force users to connect using HTTPS and turn on HSTS]]
 
* [[How to Force users to connect using HTTPS and turn on HSTS]]
 
* [[How to generate a GPG public/private key pair to get SSH keys]]
 
* [[How to generate a GPG public/private key pair to get SSH keys]]
−
 
+
* [[How to rename the Main page]]
−
'''Changes to block new user creation and password reset:'''
+
* [https://mediawiki.org/wiki/Manual:Interface/Sidebar How to edit the sidebar]
−
 
+
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources How to Localize MediaWiki for your language]
−
Need to edit:
+
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam How to combat spam on your wiki]
−
/home/wasteam8/public_html/mentor.wiki/LocalSettings.php
+
* [https://www.mediawiki.org/wiki/Extension:UserMerge How to delete users once created]
−
 
 
−
Add this to the bottom:
 
−
 
 
−
# Regulate user group permissions.
 
−
$wgGroupPermissions['*']['createaccount'] = false;
 
−
$wgGroupPermissions['user']['createaccount'] = false;
 
−
$wgGroupPermissions['administrators']['createaccount'] = false;
 
−
 
 
−
Need to edit:
 
−
/home/wasteam8/public_html/mentor.wiki/includes/specials/SpecialCreateAccount.php
 
−
 
 
−
Edit this function:
 
−
 
 
−
public function userCanExecute( User $user ) {
 
−
  /**
 
−
    * return $user->isAllowed( 'createaccount' );
 
−
  */
 
−
  global $wgUser;
 
−
  if ( $wgUser->isLoggedIn() ) {
 
−
    return $user->isAllowed( 'createaccount' );
 
−
  } else {
 
−
    return false;
 
−
  }
 
−
}
 
−
 
 
−
Need to edit:
 
−
/home/wasteam8/public_html/mentor.wiki/includes/specials/SpecialPasswordReset.php
 
−
 
 
−
Edit this function:
 
−
public function userCanExecute( User $user ) {
 
−
  $this->getOutput()->disallowUserJs();
 
−
  // If you put: $this->requireLogin(); here the entire Special Pages section will need a user logged in to see.
 
−
  global $wgUser;
 
−
  if ( $wgUser->isLoggedIn() ) {
 
−
    return $this->getPasswordReset()->isAllowed( $user )->isGood();
 
−
  } else {
 
−
    return false;
 
−
  }
 
−
}
 
−
 
 
−
This will block non-logged-in users from viewing the content if the user group isn't configured in the LocalSettings.php.
 
−
It will also block unauthorized users from seeing that same content.
 
−
 
 
−
Relevant Links:
 
−
 
 
−
https://lists.gt.net/wiki/mediawiki/126271
 
−
https://www.mediawiki.org/wiki/Manual:Special_pages#Constructor
 
−
https://www.mediawiki.org/wiki/Manual:LocalSettings.php#User_rights
 
−
https://www.mediawiki.org/wiki/Manual:User_rights#Example
 
−
https://stackoverflow.com/questions/219135/how-do-i-create-my-own-custom-group-in-mediawiki
 
−
https://www.mediawiki.org/wiki/Topic:Qji4lqoeaodggoft
 
−
https://www.mediawiki.org/wiki/Topic:Pl8qrwn9l15vc0ex
 
−
https://doc.wikimedia.org/mediawiki-core/master/php/classUser.html
 
−
https://www.mediawiki.org/wiki/Extension%3aAccessControl
 
−
https://m.mediawiki.org/wiki/Manual:SessionManager_and_AuthManager
 
−
https://m.mediawiki.org/wiki/Special:MyLanguage/Manual:Special_pages#Restricting_page_access
 
−
 
 
−
'''Force users to connect using HTTPS and turn on HSTS:'''
 
−
 
 
−
Apache: Create .htaccess files in the sub-folder of the website and put this text in the file:
 
−
 
 
−
Header set Strict-Transport-Security "max-age=300" env=HTTPS
 
−
RewriteEngine On
 
−
RewriteCond %{SERVER_PORT} 80
 
−
RewriteRule ^(.*)$ <nowiki>https://{replace with relevant URL}/$1</nowiki> [R=301,L]
 
−
 
 
−
Nginx: Edit nginx.conf and make it look like the following (please don't use .htaccess on Nginx):
 
−
server {
 
−
  listen 443 ssl;
 
−
  # Put this HSTS line here for it to wrap all locations that don't have their own defines.
 
−
  add_header Strict-Transport-Security "max-age=300" env=HTTPS
 
−
 
 
−
  location / {
 
−
    # Put this HSTS line in the 'location' section if that section defines other headers like proxies.
 
−
    add_header Strict-Transport-Security "max-age=300" env=HTTPS
 
−
    rewrite ^(.*)$ https://{replace with relevant URL}/$1
 
−
    redirect;
 
−
}
 
−
 
 
−
Relevant links:
 
−
https://winginx.com/en/htaccess
 
−
https://www.globalsign.com/en/blog/what-is-hsts-and-how-do-i-use-it/
 
−
https://css-tricks.com/snippets/htaccess/force-https/
 
−
https://www.a2hosting.com/kb/developer-corner/apache-web-server/using-htaccess-files
 
−
https://www.ssl.com/how-to/force-https-connections-in-an-apache-server-environment/
 
−
 
 
−
 
 
−
'''How to generate a GPG public/private key pair to get SSH keys:'''
 
−
 
 
−
<ol start>
 
−
# For Windows download GPG4Win: https://gpg4win.org/download.html.  Don't panic when it asks for a donation, select PayPal and $0.
 
−
# During install select your language, usually English.
 
−
# Then uncheck the check boxes next to GPA and GpgOL.
 
−
# Accept the defaults till the installation closes.
 
−
# This will create a red dot in the notification area of your start menu with a small white tea cup on it.
 
−
# Double click the Kleopatra icon a dialog will open.
 
−
# Click the 'File' menu.
 
−
# Click 'New Key Pair'.
 
−
# Click 'Create a personal OpenPGP key pair'.
 
−
# Provide a name.
 
−
# Provide a valid e-mail.
 
−
# In advanced settings you can change the details of the keys, the defaults are RSA 2048bits.  You can also set an expiration for these certificate.
 
−
# Set a passphrase that will be later be used like a password to use the private key you are generating.
 
−
# Click 'Finish' on the final menu after the keys are made.
 
−
# Right click on the keys you just created.
 
−
# Select 'Export' to export the public key.
 
−
# Put the file into a folder where you can find it.
 
−
# Name it something like: 'Public-Key_7-28-2018.asc'
 
−
# Send that file as an attachment to: 'techhelpbb@gmail' as part of the SSH request.
 
−
# I'll generate you an SSH key and encrypt it with your public key.
 
−
# Then e-mail the encrypted file back to you where you can decrypt it, first save it to a known folder.
 
−
# To decrypt the file in Kleopatra open the Kleopatra dialog again by double clicking on the icon.
 
−
# On the large buttons at the top of the dialog select 'Decrypt/Verify'.
 
−
# Find the e-mail attachment you saved in the previous step.
 
−
# After a brief delay the program should ask you if you want to 'Save All' and at the top of the dialog ask you where.
 
−
# Specify a location you prefer for the output and click 'Save All'.
 
−
 
 
−
</ol start>
 
−
 
 
−
'''Logos and Images:'''
 
−
<ol start>
 
−
# MediaWiki logos should be around 100 pixels wide and 150 pixels tall.
 
−
# MediaWiki logos go in the folder: /home/wasteam8/public_html/mentor.wiki/resources/assets
 
−
# Edit LocalSettings.php and change the $wgLogo variable to set the logo.
 
−
</ol start>
 
−
 
 
−
Relevant links:
 
−
 
 
−
https://www.dash.org/forum/threads/basic-guide-to-pgp-on-windows-pc-kleopatra-%E2%80%93-gpg4win.4086/
 
−
 
 
−
Change to Main Page Name: Changed from Main to MORT11 Mentor Wiki to better reflect site
 

Latest revision as of 15:15, 11 October 2019

Change Logs

Please update the logs when making relevant administrative changes.

Actions

Includes Create Account. Usernames should be <firstinitial><lastname>. E.g. for Joe Admin the username should be jadmin.

How To Administer a MediaWiki